From: Theodore Ts'o Date: Tue, 27 Jul 2010 15:56:06 +0000 (-0400) Subject: ext4: Don't error out the fs if the user tries to make a file too big X-Git-Tag: v2.6.36-rc1~501^2~17 X-Git-Url: https://bbs.cooldavid.org/git/?a=commitdiff_plain;h=0c095c7f113e9fd05913d6e1b2cccbe356be039e;p=net-next-2.6.git 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" --- diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 46d2079373c..38ec77fc327 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -5472,10 +5472,8 @@ int ext4_setattr(struct dentry *dentry, struct iattr *attr) if (!(ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS))) { struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); - if (attr->ia_size > sbi->s_bitmap_maxbytes) { - error = -EFBIG; - goto err_out; - } + if (attr->ia_size > sbi->s_bitmap_maxbytes) + return -EFBIG; } }