diff options
author | Jeff Layton <jlayton@redhat.com> | 2009-08-18 23:11:08 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-08-19 01:31:12 +0200 |
commit | 89a4eb4b66e8f4d395e14a14d262dac4d6ca52f0 (patch) | |
tree | e8dfb8f3c70700c44a3a56f87541d45c86eec3f7 | |
parent | MAINTAINERS: OSD LIBRARY and FILESYSTEM pattern fix (diff) | |
download | linux-89a4eb4b66e8f4d395e14a14d262dac4d6ca52f0.tar.xz linux-89a4eb4b66e8f4d395e14a14d262dac4d6ca52f0.zip |
vfs: make get_sb_pseudo set s_maxbytes to value that can be cast to signed
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>
Reviewed-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Steve French <smfrench@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Robert Love <rlove@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | fs/libfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/libfs.c b/fs/libfs.c index ddfa89948c3f..dcec3d3ea64f 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; |