From: Steve French <smfrench@gmail.com>
To: Jeff Layton <jlayton@redhat.com>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
hch@infradead.org
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 [thread overview]
Message-ID: <524f69650907220816j6400c1fdr4efd8754437f7a13@mail.gmail.com> (raw)
In-Reply-To: <1248262099-12514-1-git-send-email-jlayton@redhat.com>
Ack
On Wed, Jul 22, 2009 at 6:28 AM, Jeff Layton<jlayton@redhat.com> 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 the
> smaller s_maxbytes value for the two superblocks is used there.
>
> get_sb_pseudo sets s_maxbytes to ~0ULL, which becomes negative when cast
> to a signed value. Fix it to use MAX_LFS_FILESIZE which casts properly
> to a positive signed value.
>
> Signed-off-by: Jeff Layton <jlayton@redhat.com>
> ---
> fs/libfs.c | 2 +-
> 1 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_type, char *name,
> return PTR_ERR(s);
>
> s->s_flags = MS_NOUSER;
> - s->s_maxbytes = ~0ULL;
> + s->s_maxbytes = MAX_LFS_FILESIZE;
> s->s_blocksize = PAGE_SIZE;
> s->s_blocksize_bits = PAGE_SHIFT;
> s->s_magic = magic;
> --
> 1.6.0.6
>
>
--
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
prev parent reply other threads:[~2009-07-22 15:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-22 11:28 [PATCH] libfs: make get_sb_pseudo set s_maxbytes to value that can be cast to signed Jeff Layton
2009-07-22 11:28 ` [PATCH] fix offset checks in do_sendfile to use unsigned values Jeff Layton
2009-07-22 12:59 ` Johannes Weiner
2009-07-22 13:37 ` Jeff Layton
2009-07-22 13:51 ` Johannes Weiner
2009-07-22 14:13 ` Jeff Layton
2009-07-22 15:28 ` Steve French
2009-07-22 15:37 ` Johannes Weiner
2009-07-22 15:16 ` Steve French [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=524f69650907220816j6400c1fdr4efd8754437f7a13@mail.gmail.com \
--to=smfrench@gmail.com \
--cc=hch@infradead.org \
--cc=jlayton@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).