MAX_LFS_FILESIZE should be a loff_t
PATCH 1/1 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.
---
include/linux/fs.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
include/linux/fs.h +2 -2
@@ -1126,9 +1126,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)0x7fffffffffffffffUL)#endif #define FL_POSIX 1
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 22 lines · On Tue, 11 Sep 2012 14:22:29 -0400 Chuck Lever <[email protected]> wrote:
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
42cb56aemades_maxbytesaloff_t, thus the type ofMAX_LFS_FILESIZEshould also be aloff_t.Signed-off-by Chuck Lever <[email protected]>---
include/linux/fs.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)include/linux/fs.h +0
-0@@ -1126,9 +1126,9 @@ static inline int file_check_writeable(struct file *filp)/* Page cache limit. The filesystems should put that into their s_maxbytes
include/linux/fs.h static inline int file_check_writeable(struct file *filp) · line 1134
Quoted 10 lines
include/linux/fs.h +2
-2limits, 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)0x7fffffffffffffffUL)#endif #define FL_POSIX 1
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html