diff options
author | Jacob Keller <jacob.e.keller@intel.com> | 2020-03-26 11:37:12 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-03-26 19:39:26 -0700 |
commit | 47a39f6105d360abc8409f31fc36fac3c0925a52 (patch) | |
tree | fb9bc73078eff033baa35dca99c8531eb7253d3c /net/core/devlink.c | |
parent | cf80faee79f98c0608a86e9006af57a99ffad650 (diff) | |
download | linux-stable-47a39f6105d360abc8409f31fc36fac3c0925a52.tar.gz linux-stable-47a39f6105d360abc8409f31fc36fac3c0925a52.tar.bz2 linux-stable-47a39f6105d360abc8409f31fc36fac3c0925a52.zip |
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@resnulli.us>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/devlink.c')
-rw-r--r-- | net/core/devlink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/devlink.c b/net/core/devlink.c index 5d6887bf7b04..696660b97f89 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; |