diff options
-rw-r--r-- | fs/super.c | 10 | ||||
-rw-r--r-- | include/linux/fs.h | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/fs/super.c b/fs/super.c index 0e7207b9815c..4906e2d8f400 100644 --- a/fs/super.c +++ b/fs/super.c | |||
@@ -892,6 +892,16 @@ vfs_kern_mount(struct file_system_type *type, int flags, const char *name, void | |||
892 | if (error) | 892 | if (error) |
893 | goto out_sb; | 893 | goto out_sb; |
894 | 894 | ||
895 | /* | ||
896 | * filesystems should never set s_maxbytes larger than MAX_LFS_FILESIZE | ||
897 | * but s_maxbytes was an unsigned long long for many releases. Throw | ||
898 | * this warning for a little while to try and catch filesystems that | ||
899 | * violate this rule. This warning should be either removed or | ||
900 | * converted to a BUG() in 2.6.34. | ||
901 | */ | ||
902 | WARN((mnt->mnt_sb->s_maxbytes < 0), "%s set sb->s_maxbytes to " | ||
903 | "negative value (%lld)\n", type->name, mnt->mnt_sb->s_maxbytes); | ||
904 | |||
895 | mnt->mnt_mountpoint = mnt->mnt_root; | 905 | mnt->mnt_mountpoint = mnt->mnt_root; |
896 | mnt->mnt_parent = mnt; | 906 | mnt->mnt_parent = mnt; |
897 | up_write(&mnt->mnt_sb->s_umount); | 907 | up_write(&mnt->mnt_sb->s_umount); |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 955e34615cb7..cbb7724c11d3 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1315,7 +1315,7 @@ struct super_block { | |||
1315 | unsigned long s_blocksize; | 1315 | unsigned long s_blocksize; |
1316 | unsigned char s_blocksize_bits; | 1316 | unsigned char s_blocksize_bits; |
1317 | unsigned char s_dirt; | 1317 | unsigned char s_dirt; |
1318 | unsigned long long s_maxbytes; /* Max file size */ | 1318 | loff_t s_maxbytes; /* Max file size */ |
1319 | struct file_system_type *s_type; | 1319 | struct file_system_type *s_type; |
1320 | const struct super_operations *s_op; | 1320 | const struct super_operations *s_op; |
1321 | const struct dquot_operations *dq_op; | 1321 | const struct dquot_operations *dq_op; |