[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200326183718.2384349-6-jacob.e.keller@intel.com>
Date: Thu, 26 Mar 2020 11:37:12 -0700
From: Jacob Keller <jacob.e.keller@...el.com>
To: netdev@...r.kernel.org
Cc: Jakub Kicinski <kuba@...nel.org>, Jiri Pirko <jiri@...nulli.us>,
Jacob Keller <jacob.e.keller@...el.com>,
Jiri Pirko <jiri@...lanox.com>
Subject: [PATCH net-next v3 05/11] devlink: use -ENOSPC to indicate no more room for snapshots
The devlink_region_snapshot_create function returns -ENOMEM when the
maximum number of snapshots has been reached. This is confusing because
it is not an issue of being out of memory. Change this to use -ENOSPC
instead.
Reported-by: Jiri Pirko <jiri@...nulli.us>
Signed-off-by: Jacob Keller <jacob.e.keller@...el.com>
Reviewed-by: Jiri Pirko <jiri@...lanox.com>
---
Changes since v1:
* Introduced this patch
net/core/devlink.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/devlink.c b/net/core/devlink.c
index 620e9d07ac85..8c2c4bc009bb 100644
--- a/net/core/devlink.c
+++ b/net/core/devlink.c
@@ -3793,7 +3793,7 @@ __devlink_region_snapshot_create(struct devlink_region *region,
/* check if region can hold one more snapshot */
if (region->cur_snapshots == region->max_snapshots)
- return -ENOMEM;
+ return -ENOSPC;
if (devlink_region_snapshot_get_by_id(region, snapshot_id))
return -EEXIST;
--
2.24.1
Powered by blists - more mailing lists