diff options
author | npiggin@suse.de <npiggin@suse.de> | 2009-08-21 02:35:06 +1000 |
---|---|---|
committer | al <al@dizzy.pdmi.ras.ru> | 2009-09-24 08:41:47 -0400 |
commit | c08d3b0e33edce28e9cfa7b64f7fe5bdeeb29248 (patch) | |
tree | 6c161cc57a2873e6f91335113192a99531901cd8 /fs/buffer.c | |
parent | 25d9e2d15286281ec834b829a4aaf8969011f1cd (diff) | |
download | op-kernel-dev-c08d3b0e33edce28e9cfa7b64f7fe5bdeeb29248.zip op-kernel-dev-c08d3b0e33edce28e9cfa7b64f7fe5bdeeb29248.tar.gz |
truncate: use new helpers
Update some fs code to make use of new helper functions introduced
in the previous patch. Should be no significant change in behaviour
(except CIFS now calls send_sig under i_lock, via inode_newsize_ok).
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Miklos Szeredi <miklos@szeredi.hu>
Cc: linux-nfs@vger.kernel.org
Cc: Trond.Myklebust@netapp.com
Cc: linux-cifs-client@lists.samba.org
Cc: sfrench@samba.org
Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/buffer.c')
-rw-r--r-- | fs/buffer.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/fs/buffer.c b/fs/buffer.c index 209f7f1..24afd74 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -2239,16 +2239,10 @@ int generic_cont_expand_simple(struct inode *inode, loff_t size) struct address_space *mapping = inode->i_mapping; struct page *page; void *fsdata; - unsigned long limit; int err; - err = -EFBIG; - limit = current->signal->rlim[RLIMIT_FSIZE].rlim_cur; - if (limit != RLIM_INFINITY && size > (loff_t)limit) { - send_sig(SIGXFSZ, current, 0); - goto out; - } - if (size > inode->i_sb->s_maxbytes) + err = inode_newsize_ok(inode, size); + if (err) goto out; err = pagecache_write_begin(NULL, mapping, size, 0, |