diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-20 19:44:06 +0100 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-20 19:44:06 +0100 |
commit | 755c1e20cd2ad56e5c567fa05769eb98a3eef72b (patch) | |
tree | afc643f89b342011af6a14ee24b999f9106f6c2b /fs/nfs/inode.c | |
parent | lockd: Don't expose the process pid to the NLM server (diff) | |
download | linux-755c1e20cd2ad56e5c567fa05769eb98a3eef72b.tar.xz linux-755c1e20cd2ad56e5c567fa05769eb98a3eef72b.zip |
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>
Diffstat (limited to '')
-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) 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 */ |