Skip to content

Commit

Permalink
ocfs2_file_aio_write(): switch to generic_perform_write()
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Apr 2, 2014
1 parent aec605f commit 58bfab3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions fs/ocfs2/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -2381,9 +2381,12 @@ static ssize_t ocfs2_file_aio_write(struct kiocb *iocb,
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;
}

Expand Down

0 comments on commit 58bfab3

Please sign in to comment.