diff options
Diffstat (limited to 'fs/nfs/file.c')
-rw-r--r-- | fs/nfs/file.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfs/file.c b/fs/nfs/file.c index f5fdd39e037a..6b891328f332 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c | |||
@@ -581,7 +581,7 @@ static int nfs_need_sync_write(struct file *filp, struct inode *inode) | |||
581 | { | 581 | { |
582 | struct nfs_open_context *ctx; | 582 | struct nfs_open_context *ctx; |
583 | 583 | ||
584 | if (IS_SYNC(inode) || (filp->f_flags & O_SYNC)) | 584 | if (IS_SYNC(inode) || (filp->f_flags & O_DSYNC)) |
585 | return 1; | 585 | return 1; |
586 | ctx = nfs_file_open_context(filp); | 586 | ctx = nfs_file_open_context(filp); |
587 | if (test_bit(NFS_CONTEXT_ERROR_WRITE, &ctx->flags)) | 587 | if (test_bit(NFS_CONTEXT_ERROR_WRITE, &ctx->flags)) |
@@ -622,7 +622,7 @@ static ssize_t nfs_file_write(struct kiocb *iocb, const struct iovec *iov, | |||
622 | 622 | ||
623 | nfs_add_stats(inode, NFSIOS_NORMALWRITTENBYTES, count); | 623 | nfs_add_stats(inode, NFSIOS_NORMALWRITTENBYTES, count); |
624 | result = generic_file_aio_write(iocb, iov, nr_segs, pos); | 624 | result = generic_file_aio_write(iocb, iov, nr_segs, pos); |
625 | /* Return error values for O_SYNC and IS_SYNC() */ | 625 | /* Return error values for O_DSYNC and IS_SYNC() */ |
626 | if (result >= 0 && nfs_need_sync_write(iocb->ki_filp, inode)) { | 626 | if (result >= 0 && nfs_need_sync_write(iocb->ki_filp, inode)) { |
627 | int err = nfs_do_fsync(nfs_file_open_context(iocb->ki_filp), inode); | 627 | int err = nfs_do_fsync(nfs_file_open_context(iocb->ki_filp), inode); |
628 | if (err < 0) | 628 | if (err < 0) |