diff options
Diffstat (limited to 'fs/cifs/cifsfs.c')
-rw-r--r-- | fs/cifs/cifsfs.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index a8323f1dc1c4..f2970136d17d 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
@@ -600,10 +600,17 @@ static ssize_t cifs_file_aio_write(struct kiocb *iocb, const struct iovec *iov, | |||
600 | { | 600 | { |
601 | struct inode *inode = iocb->ki_filp->f_path.dentry->d_inode; | 601 | struct inode *inode = iocb->ki_filp->f_path.dentry->d_inode; |
602 | ssize_t written; | 602 | ssize_t written; |
603 | int rc; | ||
603 | 604 | ||
604 | written = generic_file_aio_write(iocb, iov, nr_segs, pos); | 605 | written = generic_file_aio_write(iocb, iov, nr_segs, pos); |
605 | if (!CIFS_I(inode)->clientCanCacheAll) | 606 | |
606 | filemap_fdatawrite(inode->i_mapping); | 607 | if (CIFS_I(inode)->clientCanCacheAll) |
608 | return written; | ||
609 | |||
610 | rc = filemap_fdatawrite(inode->i_mapping); | ||
611 | if (rc) | ||
612 | cFYI(1, "cifs_file_aio_write: %d rc on %p inode", rc, inode); | ||
613 | |||
607 | return written; | 614 | return written; |
608 | } | 615 | } |
609 | 616 | ||
@@ -737,7 +744,7 @@ const struct file_operations cifs_file_strict_ops = { | |||
737 | .read = do_sync_read, | 744 | .read = do_sync_read, |
738 | .write = do_sync_write, | 745 | .write = do_sync_write, |
739 | .aio_read = cifs_strict_readv, | 746 | .aio_read = cifs_strict_readv, |
740 | .aio_write = cifs_file_aio_write, | 747 | .aio_write = cifs_strict_writev, |
741 | .open = cifs_open, | 748 | .open = cifs_open, |
742 | .release = cifs_close, | 749 | .release = cifs_close, |
743 | .lock = cifs_lock, | 750 | .lock = cifs_lock, |
@@ -793,7 +800,7 @@ const struct file_operations cifs_file_strict_nobrl_ops = { | |||
793 | .read = do_sync_read, | 800 | .read = do_sync_read, |
794 | .write = do_sync_write, | 801 | .write = do_sync_write, |
795 | .aio_read = cifs_strict_readv, | 802 | .aio_read = cifs_strict_readv, |
796 | .aio_write = cifs_file_aio_write, | 803 | .aio_write = cifs_strict_writev, |
797 | .open = cifs_open, | 804 | .open = cifs_open, |
798 | .release = cifs_close, | 805 | .release = cifs_close, |
799 | .fsync = cifs_strict_fsync, | 806 | .fsync = cifs_strict_fsync, |