diff options
author | Tejun Heo <tj@kernel.org> | 2011-02-21 09:43:56 +0100 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2011-02-21 09:43:56 +0100 |
commit | 43d133c18b44e7d82d82ef0dcc2bddd55d5dfe81 (patch) | |
tree | 8de75c837b55874cc8a81a29bdedbc62668d4481 /fs/cifs/cifsfs.c | |
parent | 4149efb22da66e326fc48baf80d628834509f7f0 (diff) | |
parent | 6f576d57f1fa0d6026b495d8746d56d949989161 (diff) | |
download | blackbird-op-linux-43d133c18b44e7d82d82ef0dcc2bddd55d5dfe81.tar.gz blackbird-op-linux-43d133c18b44e7d82d82ef0dcc2bddd55d5dfe81.zip |
Merge branch 'master' into for-2.6.39
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, { struct inode *inode = iocb->ki_filp->f_path.dentry->d_inode; ssize_t written; + int rc; written = generic_file_aio_write(iocb, iov, nr_segs, pos); - if (!CIFS_I(inode)->clientCanCacheAll) - filemap_fdatawrite(inode->i_mapping); + + if (CIFS_I(inode)->clientCanCacheAll) + return written; + + rc = filemap_fdatawrite(inode->i_mapping); + if (rc) + cFYI(1, "cifs_file_aio_write: %d rc on %p inode", rc, inode); + return written; } @@ -737,7 +744,7 @@ const struct file_operations cifs_file_strict_ops = { .read = do_sync_read, .write = do_sync_write, .aio_read = cifs_strict_readv, - .aio_write = cifs_file_aio_write, + .aio_write = cifs_strict_writev, .open = cifs_open, .release = cifs_close, .lock = cifs_lock, @@ -793,7 +800,7 @@ const struct file_operations cifs_file_strict_nobrl_ops = { .read = do_sync_read, .write = do_sync_write, .aio_read = cifs_strict_readv, - .aio_write = cifs_file_aio_write, + .aio_write = cifs_strict_writev, .open = cifs_open, .release = cifs_close, .fsync = cifs_strict_fsync, |