diff options
Diffstat (limited to 'fs/nfs/file.c')
-rw-r--r-- | fs/nfs/file.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/fs/nfs/file.c b/fs/nfs/file.c index a606708264ed..40436857ed42 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c | |||
@@ -333,9 +333,15 @@ nfs_file_write(struct kiocb *iocb, const char __user *buf, size_t count, loff_t | |||
333 | result = -EBUSY; | 333 | result = -EBUSY; |
334 | if (IS_SWAPFILE(inode)) | 334 | if (IS_SWAPFILE(inode)) |
335 | goto out_swapfile; | 335 | goto out_swapfile; |
336 | result = nfs_revalidate_inode(NFS_SERVER(inode), inode); | 336 | /* |
337 | if (result) | 337 | * O_APPEND implies that we must revalidate the file length. |
338 | goto out; | 338 | */ |
339 | if (iocb->ki_filp->f_flags & O_APPEND) { | ||
340 | result = nfs_revalidate_file_size(inode, iocb->ki_filp); | ||
341 | if (result) | ||
342 | goto out; | ||
343 | } else | ||
344 | nfs_revalidate_mapping(inode, iocb->ki_filp->f_mapping); | ||
339 | 345 | ||
340 | result = count; | 346 | result = count; |
341 | if (!count) | 347 | if (!count) |