diff options
author | npiggin@suse.de <npiggin@suse.de> | 2010-05-27 01:05:34 +1000 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-05-27 22:15:42 -0400 |
commit | 15c6fd9786dfaab43547bf60df6fa63170fb64fc (patch) | |
tree | afd997b3402761e28b6c39f414fbd93c69fdcdce /fs/ufs | |
parent | 7bb46a6734a7e1ad4beaecc11cae7ed3ff81d30f (diff) | |
download | linux-15c6fd9786dfaab43547bf60df6fa63170fb64fc.tar.bz2 |
kill spurious reference to vmtruncate
Lots of filesystems calls vmtruncate despite not implementing the old
->truncate method. Switch them to use simple_setsize and add some
comments about the truncate code where it seems fitting.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ufs')
-rw-r--r-- | fs/ufs/truncate.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/ufs/truncate.c b/fs/ufs/truncate.c index f294c44577dc..3733057e7833 100644 --- a/fs/ufs/truncate.c +++ b/fs/ufs/truncate.c @@ -501,12 +501,10 @@ out: return err; } - /* - * We don't define our `inode->i_op->truncate', and call it here, - * because of: - * - there is no way to know old size - * - there is no way inform user about error, if it happens in `truncate' + * TODO: + * - truncate case should use proper ordering instead of using + * simple_setsize */ int ufs_setattr(struct dentry *dentry, struct iattr *attr) { @@ -530,7 +528,7 @@ int ufs_setattr(struct dentry *dentry, struct iattr *attr) if (ia_valid & ATTR_SIZE && attr->ia_size != inode->i_size) { loff_t old_i_size = inode->i_size; - error = vmtruncate(inode, attr->ia_size); + error = simple_setsize(inode, attr->ia_size); if (error) return error; error = ufs_truncate(inode, old_i_size); |