vfs: explicitly cast s_maxbytes in fiemap_check_ranges
authorJeff Layton <jlayton@redhat.com>
Fri, 18 Sep 2009 20:05:50 +0000 (13:05 -0700)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 24 Sep 2009 11:47:31 +0000 (07:47 -0400)
commit5aa98b706e83da4cde4172c890d6e815915536a0
treece7a52cb4d019110076ef0d3791a947ce343abc6
parent05cc0cee6948fc11985d11557fb130645a7f69a6
vfs: explicitly cast s_maxbytes in fiemap_check_ranges

If fiemap_check_ranges is passed a large enough value, then it's
possible that the value would be cast to a signed value for comparison
against s_maxbytes when we change it to loff_t. Make sure that doesn't
happen by explicitly casting s_maxbytes to an unsigned value for the
purposes of comparison.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Robert Love <rlove@google.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Mandeep Singh Baines <msb@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/ioctl.c