diff options
Diffstat (limited to 'fs/nfs/file.c')
| -rw-r--r-- | fs/nfs/file.c | 8 | 
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/nfs/file.c b/fs/nfs/file.c index aa9b709fd32..56311ca5f9f 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c @@ -174,6 +174,13 @@ nfs_file_flush(struct file *file, fl_owner_t id)  	if ((file->f_mode & FMODE_WRITE) == 0)  		return 0; +	/* +	 * If we're holding a write delegation, then just start the i/o +	 * but don't wait for completion (or send a commit). +	 */ +	if (nfs_have_delegation(inode, FMODE_WRITE)) +		return filemap_fdatawrite(file->f_mapping); +  	/* Flush writes to the server and return any errors */  	return vfs_fsync(file, 0);  } @@ -417,6 +424,7 @@ static int nfs_write_end(struct file *file, struct address_space *mapping,  	if (status < 0)  		return status; +	NFS_I(mapping->host)->write_io += copied;  	return copied;  }  |