Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 755c1e20 authored by Trond Myklebust's avatar Trond Myklebust
Browse files

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: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 7bab377f
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -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) {
	/* 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
	 */