From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chuck Lever Subject: [PATCH] MAX_LFS_FILESIZE should be a loff_t Date: Mon, 24 Sep 2012 14:51:48 -0400 Message-ID: <20120924185129.45702.23599.stgit@degas.1015granger.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: linux-fsdevel@vger.kernel.org To: viro@zeniv.linux.org.uk Return-path: Received: from mail-ie0-f174.google.com ([209.85.223.174]:47140 "EHLO mail-ie0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757365Ab2IXSvv (ORCPT ); Mon, 24 Sep 2012 14:51:51 -0400 Received: by ieak13 with SMTP id k13so11782076iea.19 for ; Mon, 24 Sep 2012 11:51:50 -0700 (PDT) Sender: linux-fsdevel-owner@vger.kernel.org List-ID: fs/nfs/internal.h: In function =E2=80=98nfs_super_set_maxbytes=E2=80=99= : 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 --- Tested with x86_64 only. include/linux/fs.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/fs.h b/include/linux/fs.h index aa11047..f623c42 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1126,9 +1126,9 @@ static inline int file_check_writeable(struct fil= e *filp) /* Page cache limit. The filesystems should put that into their s_maxb= ytes=20 limits, otherwise bad things can happen in VM. */=20 #if BITS_PER_LONG=3D=3D32 -#define MAX_LFS_FILESIZE (((u64)PAGE_CACHE_SIZE << (BITS_PER_LONG-1))-= 1)=20 +#define MAX_LFS_FILESIZE (((loff_t)PAGE_CACHE_SIZE << (BITS_PER_LONG-1= ))-1)=20 #elif BITS_PER_LONG=3D=3D64 -#define MAX_LFS_FILESIZE 0x7fffffffffffffffUL +#define MAX_LFS_FILESIZE ((loff_t)0x7fffffffffffffff) #endif =20 #define FL_POSIX 1 -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html