Commit 89a4eb4b authored by Jeff Layton's avatar Jeff Layton Committed by Linus Torvalds

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: default avatarJeff Layton <>
Reviewed-by: default avatarJohannes Weiner <>
Acked-by: default avatarSteve French <>
Reviewed-by: default avatarChristoph Hellwig <>
Cc: Al Viro <>
Cc: Robert Love <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 6b6f0b6c
......@@ -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;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment