ceph: decoding error in ceph_update_snap_realm should return -EIO
authorJeff Layton <jlayton@kernel.org>
Tue, 1 Jun 2021 14:07:56 +0000 (10:07 -0400)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 28 Jun 2021 22:15:51 +0000 (00:15 +0200)
commitf3fd3ea6a26aed5449028608b639f6c6b2fda7f7
treec8a6c07b6434ed0e17d6fd6a55d12de4558860c8
parent903f4fec78dd05a48fdccdf4539c040fb2d5bbf4
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>
fs/ceph/snap.c