From: Chuck Lever Date: Mon, 24 Sep 2012 18:51:48 +0000 (-0400) Subject: MAX_LFS_FILESIZE should be a loff_t X-Git-Tag: firefly_0821_release~3680^2~1938^2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2bd2c1941f141ad780135ccc1cd08ca71a24f10a;p=firefly-linux-kernel-4.4.55.git MAX_LFS_FILESIZE should be a loff_t fs/nfs/internal.h: In function ‘nfs_super_set_maxbytes’: fs/nfs/internal.h:547:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Seen with gcc (GCC) 4.6.3 20120306 (Red Hat 4.6.3-2). Commit 42cb56ae made s_maxbytes a loff_t, thus the type of MAX_LFS_FILESIZE should also be a loff_t. Signed-off-by: Chuck Lever Acked-by: Jeff Layton Signed-off-by: Al Viro --- diff --git a/include/linux/fs.h b/include/linux/fs.h index de1db1c12080..ca6d8c806f47 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1130,9 +1130,9 @@ static inline int file_check_writeable(struct file *filp) /* Page cache limit. The filesystems should put that into their s_maxbytes limits, otherwise bad things can happen in VM. */ #if BITS_PER_LONG==32 -#define MAX_LFS_FILESIZE (((u64)PAGE_CACHE_SIZE << (BITS_PER_LONG-1))-1) +#define MAX_LFS_FILESIZE (((loff_t)PAGE_CACHE_SIZE << (BITS_PER_LONG-1))-1) #elif BITS_PER_LONG==64 -#define MAX_LFS_FILESIZE 0x7fffffffffffffffUL +#define MAX_LFS_FILESIZE ((loff_t)0x7fffffffffffffff) #endif #define FL_POSIX 1