aboutsummaryrefslogtreecommitdiffstats
path: root/fs/buffer.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-09-24 23:15:15 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-09-24 23:15:15 -0400
commitc373ba999103fa794f041eab5bd490714d2dee88 (patch)
tree8f2b445b1e0af2491c83527967dbcda76054a486 /fs/buffer.c
parent6f3529f00a0a9ac06413d18d3926adf099cb59af (diff)
parent851b147e4411df6a1e7e90e2a609773c277eefd2 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'fs/buffer.c')
-rw-r--r--fs/buffer.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/fs/buffer.c b/fs/buffer.c
index 209f7f15f5f8..24afd7422ae8 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -2239,16 +2239,10 @@ int generic_cont_expand_simple(struct inode *inode, loff_t size)
2239 struct address_space *mapping = inode->i_mapping; 2239 struct address_space *mapping = inode->i_mapping;
2240 struct page *page; 2240 struct page *page;
2241 void *fsdata; 2241 void *fsdata;
2242 unsigned long limit;
2243 int err; 2242 int err;
2244 2243
2245 err = -EFBIG; 2244 err = inode_newsize_ok(inode, size);
2246 limit = current->signal->rlim[RLIMIT_FSIZE].rlim_cur; 2245 if (err)
2247 if (limit != RLIM_INFINITY && size > (loff_t)limit) {
2248 send_sig(SIGXFSZ, current, 0);
2249 goto out;
2250 }
2251 if (size > inode->i_sb->s_maxbytes)
2252 goto out; 2246 goto out;
2253 2247
2254 err = pagecache_write_begin(NULL, mapping, size, 0, 2248 err = pagecache_write_begin(NULL, mapping, size, 0,