diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-20 13:44:06 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-20 13:44:06 -0500 |
commit | 755c1e20cd2ad56e5c567fa05769eb98a3eef72b (patch) | |
tree | afc643f89b342011af6a14ee24b999f9106f6c2b | |
parent | 7bab377fcb495ee2e5a1cd69d235f8d84c76e3af (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>
-rw-r--r-- | fs/nfs/inode.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 8d5b6691ae3d..5746dc841a6c 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -859,11 +859,9 @@ nfs_setattr(struct dentry *dentry, struct iattr *attr) | |||
859 | 859 | ||
860 | lock_kernel(); | 860 | lock_kernel(); |
861 | nfs_begin_data_update(inode); | 861 | nfs_begin_data_update(inode); |
862 | /* Write all dirty data if we're changing file permissions or size */ | 862 | /* Write all dirty data */ |
863 | if ((attr->ia_valid & (ATTR_MODE|ATTR_UID|ATTR_GID|ATTR_SIZE)) != 0) { | 863 | filemap_write_and_wait(inode->i_mapping); |
864 | filemap_write_and_wait(inode->i_mapping); | 864 | nfs_wb_all(inode); |
865 | nfs_wb_all(inode); | ||
866 | } | ||
867 | /* | 865 | /* |
868 | * Return any delegations if we're going to change ACLs | 866 | * Return any delegations if we're going to change ACLs |
869 | */ | 867 | */ |