From: Jeff Layton Date: Tue, 1 Jun 2021 14:07:56 +0000 (-0400) Subject: ceph: decoding error in ceph_update_snap_realm should return -EIO X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=f3fd3ea6a26aed5449028608b639f6c6b2fda7f7;p=linux.git 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 Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov --- diff --git a/fs/ceph/snap.c b/fs/ceph/snap.c index 44b380a53727a..2a63fb37778b3 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);