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 aa9b709fd328..56311ca5f9f8 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) | |||
174 | if ((file->f_mode & FMODE_WRITE) == 0) | 174 | if ((file->f_mode & FMODE_WRITE) == 0) |
175 | return 0; | 175 | return 0; |
176 | 176 | ||
177 | /* | ||
178 | * If we're holding a write delegation, then just start the i/o | ||
179 | * but don't wait for completion (or send a commit). | ||
180 | */ | ||
181 | if (nfs_have_delegation(inode, FMODE_WRITE)) | ||
182 | return filemap_fdatawrite(file->f_mapping); | ||
183 | |||
177 | /* Flush writes to the server and return any errors */ | 184 | /* Flush writes to the server and return any errors */ |
178 | return vfs_fsync(file, 0); | 185 | return vfs_fsync(file, 0); |
179 | } | 186 | } |
@@ -417,6 +424,7 @@ static int nfs_write_end(struct file *file, struct address_space *mapping, | |||
417 | 424 | ||
418 | if (status < 0) | 425 | if (status < 0) |
419 | return status; | 426 | return status; |
427 | NFS_I(mapping->host)->write_io += copied; | ||
420 | return copied; | 428 | return copied; |
421 | } | 429 | } |
422 | 430 | ||