]> git.baikalelectronics.ru Git - kernel.git/commit
ceph: convert int fields in ceph_mount_options to unsigned int
authorJeff Layton <jlayton@kernel.org>
Mon, 9 Sep 2019 19:58:55 +0000 (15:58 -0400)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 9 Dec 2019 19:55:10 +0000 (20:55 +0100)
commit645d873946b706867a2332becb308a2062bd970f
tree824a7c9471d2f260f998f57ed2c192ab85555c7a
parent7855fcc07be326322b44982a21760fd9bd8e2b92
ceph: convert int fields in ceph_mount_options to unsigned int

Most of these values should never be negative, so convert them to
unsigned values. Add some sanity checking to the parsed values, and
clean up some unneeded casts.

Note that while caps_max should never be negative, this patch leaves
it signed, since this value ends up later being compared to a signed
counter. Just ensure that userland never passes in a negative value
for caps_max.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/mds_client.c
fs/ceph/super.c
fs/ceph/super.h