summaryrefslogtreecommitdiff
path: root/fs/ceph
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2021-06-01 10:07:56 -0400
committerIlya Dryomov <idryomov@gmail.com>2021-06-29 00:15:51 +0200
commitf3fd3ea6a26aed5449028608b639f6c6b2fda7f7 (patch)
treec8a6c07b6434ed0e17d6fd6a55d12de4558860c8 /fs/ceph
parent903f4fec78dd05a48fdccdf4539c040fb2d5bbf4 (diff)
ceph: decoding error in ceph_update_snap_realm should return -EIO
Currently ceph_update_snap_realm returns -EINVAL when it hits a decoding error, which is the wrong error code. -EINVAL implies that the user gave us a bogus argument to a syscall or something similar. -EIO is more descriptive when we hit a decoding error. Signed-off-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Ilya Dryomov <idryomov@gmail.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph')
-rw-r--r--fs/ceph/snap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ceph/snap.c b/fs/ceph/snap.c
index 44b380a53727..2a63fb37778b 100644
--- a/fs/ceph/snap.c
+++ b/fs/ceph/snap.c
@@ -791,7 +791,7 @@ more:
return 0;
bad:
- err = -EINVAL;
+ err = -EIO;
fail:
if (realm && !IS_ERR(realm))
ceph_put_snap_realm(mdsc, realm);