diff options
-rw-r--r-- | fs/nfsd/vfs.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index e3ef3ec0efd0..d5fe17cb07e3 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c | |||
@@ -782,12 +782,9 @@ static inline int nfsd_dosync(struct file *filp, struct dentry *dp, | |||
782 | int (*fsync) (struct file *, struct dentry *, int); | 782 | int (*fsync) (struct file *, struct dentry *, int); |
783 | int err; | 783 | int err; |
784 | 784 | ||
785 | err = filemap_fdatawrite(inode->i_mapping); | 785 | err = filemap_write_and_wait(inode->i_mapping); |
786 | if (err == 0 && fop && (fsync = fop->fsync)) | 786 | if (err == 0 && fop && (fsync = fop->fsync)) |
787 | err = fsync(filp, dp, 0); | 787 | err = fsync(filp, dp, 0); |
788 | if (err == 0) | ||
789 | err = filemap_fdatawait(inode->i_mapping); | ||
790 | |||
791 | return err; | 788 | return err; |
792 | } | 789 | } |
793 | 790 | ||