From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steve French Subject: Re: [PATCH] libfs: make get_sb_pseudo set s_maxbytes to value that can be cast to signed Date: Wed, 22 Jul 2009 10:16:38 -0500 Message-ID: <524f69650907220816j6400c1fdr4efd8754437f7a13@mail.gmail.com> References: <1248262099-12514-1-git-send-email-jlayton@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, hch@infradead.org To: Jeff Layton Return-path: Received: from mail-qy0-f173.google.com ([209.85.221.173]:58144 "EHLO mail-qy0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752089AbZGVPQk convert rfc822-to-8bit (ORCPT ); Wed, 22 Jul 2009 11:16:40 -0400 In-Reply-To: <1248262099-12514-1-git-send-email-jlayton@redhat.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Ack On Wed, Jul 22, 2009 at 6:28 AM, Jeff Layton wrote: > This patch is a counterpart to the CIFS patch posted yesterday. I > believe either patch will fix the problem seen in do_sendfile since t= he > smaller s_maxbytes value for the two superblocks is used there. > > get_sb_pseudo sets s_maxbytes to ~0ULL, which becomes negative when c= ast > to a signed value. Fix it to use MAX_LFS_FILESIZE which casts properl= y > to a positive signed value. > > Signed-off-by: Jeff Layton > --- > =A0fs/libfs.c | =A0 =A02 +- > =A01 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/fs/libfs.c b/fs/libfs.c > index ddfa899..dcec3d3 100644 > --- a/fs/libfs.c > +++ b/fs/libfs.c > @@ -217,7 +217,7 @@ int get_sb_pseudo(struct file_system_type *fs_typ= e, char *name, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return PTR_ERR(s); > > =A0 =A0 =A0 =A0s->s_flags =3D MS_NOUSER; > - =A0 =A0 =A0 s->s_maxbytes =3D ~0ULL; > + =A0 =A0 =A0 s->s_maxbytes =3D MAX_LFS_FILESIZE; > =A0 =A0 =A0 =A0s->s_blocksize =3D PAGE_SIZE; > =A0 =A0 =A0 =A0s->s_blocksize_bits =3D PAGE_SHIFT; > =A0 =A0 =A0 =A0s->s_magic =3D magic; > -- > 1.6.0.6 > > --=20 Thanks, Steve -- 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