From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Layton Subject: Re: [PATCH] MAX_LFS_FILESIZE should be a loff_t Date: Wed, 12 Sep 2012 06:44:39 -0400 Message-ID: <20120912064439.2aa2049e@tlielax.poochiereds.net> References: <20120911182228.13624.48529.stgit@seurat.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: Chuck Lever Return-path: Received: from mx1.redhat.com ([209.132.183.28]:29985 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757421Ab2ILKom convert rfc822-to-8bit (ORCPT ); Wed, 12 Sep 2012 06:44:42 -0400 In-Reply-To: <20120911182228.13624.48529.stgit@seurat.1015granger.net> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, 11 Sep 2012 14:22:29 -0400 Chuck Lever wrote: > 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] >=20 > Seen with gcc (GCC) 4.6.3 20120306 (Red Hat 4.6.3-2). >=20 > Commit 42cb56ae made s_maxbytes a loff_t, thus the type of > MAX_LFS_FILESIZE should also be a loff_t. >=20 > Signed-off-by: Chuck Lever > --- >=20 > include/linux/fs.h | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/include/linux/fs.h b/include/linux/fs.h > index aa11047..24dd0ce 100644 > --- a/include/linux/fs.h > +++ b/include/linux/fs.h > @@ -1126,9 +1126,9 @@ static inline int file_check_writeable(struct f= ile *filp) > /* Page cache limit. The filesystems should put that into their s_ma= xbytes=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)0x7fffffffffffffffUL) > #endif > =20 > #define FL_POSIX 1 >=20 Acked-by: Jeff Layton -- 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