Skip to content

Commit 2bd2c19

Browse files
chuckleverAl Viro
authored andcommitted
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 42cb56a made s_maxbytes a loff_t, thus the type of MAX_LFS_FILESIZE should also be a loff_t. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Acked-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 8f9c011 commit 2bd2c19

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎include/linux/fs.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,9 +1130,9 @@ static inline int file_check_writeable(struct file *filp)
11301130
/* Page cache limit. The filesystems should put that into their s_maxbytes
11311131
limits, otherwise bad things can happen in VM. */
11321132
#if BITS_PER_LONG==32
1133-
#define MAX_LFS_FILESIZE (((u64)PAGE_CACHE_SIZE << (BITS_PER_LONG-1))-1)
1133+
#define MAX_LFS_FILESIZE (((loff_t)PAGE_CACHE_SIZE << (BITS_PER_LONG-1))-1)
11341134
#elif BITS_PER_LONG==64
1135-
#define MAX_LFS_FILESIZE 0x7fffffffffffffffUL
1135+
#define MAX_LFS_FILESIZE ((loff_t)0x7fffffffffffffff)
11361136
#endif
11371137

11381138
#define FL_POSIX 1

0 commit comments

Comments
 (0)