From: Al Viro Date: Wed, 12 Feb 2014 03:34:52 +0000 (-0500) Subject: ocfs2_file_aio_write(): switch to generic_perform_write() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=58bfab395b302306baccbd1b5f38a9b890acb4e3;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git ocfs2_file_aio_write(): switch to generic_perform_write() Signed-off-by: Al Viro --- diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index 77b8a742866f..9c27adf4ac72 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -2381,9 +2381,12 @@ relock: goto out_dio; } } else { + struct iov_iter from; + iov_iter_init(&from, iov, nr_segs, count, 0); current->backing_dev_info = file->f_mapping->backing_dev_info; - written = generic_file_buffered_write(iocb, iov, nr_segs, *ppos, - count, 0); + written = generic_perform_write(file, &from, *ppos); + if (likely(written >= 0)) + iocb->ki_pos = *ppos + written; current->backing_dev_info = NULL; }