[prev in list] [next in list] [prev in thread] [next in thread]
List: git-commits-head
Subject: ext4: Don't error out the fs if the user tries to make a file too big
From: Linux Kernel Mailing List <linux-kernel () vger ! kernel ! org>
Date: 2010-08-07 22:00:10
Message-ID: 201008072200.o77M0A0C022077 () hera ! kernel ! org
[Download RAW message or body]
Gitweb: http://git.kernel.org/linus/0c095c7f113e9fd05913d6e1b2cccbe356be039e
Commit: 0c095c7f113e9fd05913d6e1b2cccbe356be039e
Parent: 506bf2d82165c09b179a5077e01037f6270a4db3
Author: Theodore Ts'o <tytso@mit.edu>
AuthorDate: Tue Jul 27 11:56:06 2010 -0400
Committer: Theodore Ts'o <tytso@mit.edu>
CommitDate: Tue Jul 27 11:56:06 2010 -0400
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>
---
fs/ext4/inode.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 46d2079..38ec77f 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;
}
}
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic