aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2010-07-27 11:56:06 -0400
committerTheodore Ts'o <tytso@mit.edu>2010-07-27 11:56:06 -0400
commit0c095c7f113e9fd05913d6e1b2cccbe356be039e (patch)
treef23477719c99d5c20b4f1817c0ebe302a74eb870 /fs/ext4
parent506bf2d82165c09b179a5077e01037f6270a4db3 (diff)
ext4: Don't error out the fs if the user tries to make a file too big
If the user attempts to make a non-extent-mapped file to be too large, return EFBIG, but don't call ext4_std_err() which will end up marking the file system as containing an error. Thanks to Toshiyuki Okajima-san at Fujitsu for pointing this out. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/inode.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 46d2079373c9..38ec77fc3279 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -5472,10 +5472,8 @@ int ext4_setattr(struct dentry *dentry, struct iattr *attr)
5472 if (!(ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS))) { 5472 if (!(ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS))) {
5473 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); 5473 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb);
5474 5474
5475 if (attr->ia_size > sbi->s_bitmap_maxbytes) { 5475 if (attr->ia_size > sbi->s_bitmap_maxbytes)
5476 error = -EFBIG; 5476 return -EFBIG;
5477 goto err_out;
5478 }
5479 } 5477 }
5480 } 5478 }
5481 5479