summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2008-01-21 21:02:11 +0200
committerAdrian Bunk <bunk@kernel.org>2008-01-21 21:02:11 +0200
commit83005c1cb725c489abba78e08908d76bb248ef82 (patch)
treeaa77eaef362532c021c585e9a7235365e2a9655a
parent0b8a0a777d2d114f84716117ffb36a3d3644b7fe (diff)
NFS: writes should not clobber utimes() calls
Ensure that we flush out writes in the case when someone calls utimes() in order to set the file times. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Adrian Bunk <bunk@kernel.org>
-rw-r--r--fs/nfs/inode.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index a77ee95b7efb..0524a20be3f4 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -859,11 +859,9 @@ nfs_setattr(struct dentry *dentry, struct iattr *attr)
lock_kernel();
nfs_begin_data_update(inode);
- /* Write all dirty data if we're changing file permissions or size */
- if ((attr->ia_valid & (ATTR_MODE|ATTR_UID|ATTR_GID|ATTR_SIZE)) != 0) {
- filemap_write_and_wait(inode->i_mapping);
- nfs_wb_all(inode);
- }
+ /* Write all dirty data */
+ filemap_write_and_wait(inode->i_mapping);
+ nfs_wb_all(inode);
/*
* Return any delegations if we're going to change ACLs
*/