diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-12-05 00:35:40 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-12-06 10:46:38 -0500 |
commit | 200baa2112012dd8a13db9da3ee6885403f9c013 (patch) | |
tree | 261f9c2b85927c2dfaaecfb7ab808d353bd84da4 /fs/nfs/file.c | |
parent | e21195a740533348e77efa8a2e2cf03bb4092b2b (diff) |
NFS: Remove nfs_writepage_sync()
Maintaining two parallel ways of doing synchronous writes is rather
pointless. This patch gets rid of the legacy nfs_writepage_sync(), and
replaces it with the faster asynchronous writes.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/file.c')
-rw-r--r-- | fs/nfs/file.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/nfs/file.c b/fs/nfs/file.c index d6ee60fc3ba..143a19037ce 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c | |||
@@ -378,6 +378,12 @@ static ssize_t nfs_file_write(struct kiocb *iocb, const struct iovec *iov, | |||
378 | 378 | ||
379 | nfs_add_stats(inode, NFSIOS_NORMALWRITTENBYTES, count); | 379 | nfs_add_stats(inode, NFSIOS_NORMALWRITTENBYTES, count); |
380 | result = generic_file_aio_write(iocb, iov, nr_segs, pos); | 380 | result = generic_file_aio_write(iocb, iov, nr_segs, pos); |
381 | /* Return error values for O_SYNC and IS_SYNC() */ | ||
382 | if (result >= 0 && (IS_SYNC(inode) || (iocb->ki_filp->f_flags & O_SYNC))) { | ||
383 | int err = nfs_fsync(iocb->ki_filp, dentry, 1); | ||
384 | if (err < 0) | ||
385 | result = err; | ||
386 | } | ||
381 | out: | 387 | out: |
382 | return result; | 388 | return result; |
383 | 389 | ||