View | Details | Raw Unified | Return to bug 153271
Collapse All | Expand All

(-)build/fs/nfs/inode.c (-2 / +7 lines)
Lines 862-869 nfs_setattr(struct dentry *dentry, struc Link Here
862
862
863
	lock_kernel();
863
	lock_kernel();
864
	nfs_begin_data_update(inode);
864
	nfs_begin_data_update(inode);
865
	/* Write all dirty data if we're changing file permissions or size */
865
	/* Write all dirty data if we're changing file permissions or size
866
	if ((attr->ia_valid & (ATTR_MODE|ATTR_UID|ATTR_GID|ATTR_SIZE)) != 0) {
866
	 *
867
	 * This is also required for atime/mtime updates, otherwise
868
	 * a flush of any pending writes will clobber the changes made by
869
	 * utime().
870
	 */
871
	if ((attr->ia_valid & (ATTR_MODE|ATTR_UID|ATTR_GID|ATTR_SIZE|ATTR_ATIME_SET|ATTR_MTIME_SET)) != 0) {
867
		filemap_write_and_wait(inode->i_mapping);
872
		filemap_write_and_wait(inode->i_mapping);
868
		nfs_wb_all(inode);
873
		nfs_wb_all(inode);
869
	}
874
	}

Return to bug 153271