diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-02-11 22:25:22 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-04-01 23:19:36 -0400 |
commit | 0a64bc2c0474640a850febd5ac3abb8d45b32821 (patch) | |
tree | 7aca2b142e39c14cc2039b3d9b84ac6aa47ca61b /fs | |
parent | 3b93f911d55cf8b3540f82fac4eeddfee7b5de0c (diff) |
xfs_file_buffered_aio_write(): switch to generic_perform_write()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/xfs/xfs_file.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c index e593554ce65e..c3f4289f6497 100644 --- a/fs/xfs/xfs_file.c +++ b/fs/xfs/xfs_file.c | |||
@@ -715,7 +715,7 @@ xfs_file_buffered_aio_write( | |||
715 | const struct iovec *iovp, | 715 | const struct iovec *iovp, |
716 | unsigned long nr_segs, | 716 | unsigned long nr_segs, |
717 | loff_t pos, | 717 | loff_t pos, |
718 | size_t ocount) | 718 | size_t count) |
719 | { | 719 | { |
720 | struct file *file = iocb->ki_filp; | 720 | struct file *file = iocb->ki_filp; |
721 | struct address_space *mapping = file->f_mapping; | 721 | struct address_space *mapping = file->f_mapping; |
@@ -724,7 +724,7 @@ xfs_file_buffered_aio_write( | |||
724 | ssize_t ret; | 724 | ssize_t ret; |
725 | int enospc = 0; | 725 | int enospc = 0; |
726 | int iolock = XFS_IOLOCK_EXCL; | 726 | int iolock = XFS_IOLOCK_EXCL; |
727 | size_t count = ocount; | 727 | struct iov_iter from; |
728 | 728 | ||
729 | xfs_rw_ilock(ip, iolock); | 729 | xfs_rw_ilock(ip, iolock); |
730 | 730 | ||
@@ -732,14 +732,15 @@ xfs_file_buffered_aio_write( | |||
732 | if (ret) | 732 | if (ret) |
733 | goto out; | 733 | goto out; |
734 | 734 | ||
735 | iov_iter_init(&from, iovp, nr_segs, count, 0); | ||
735 | /* We can write back this queue in page reclaim */ | 736 | /* We can write back this queue in page reclaim */ |
736 | current->backing_dev_info = mapping->backing_dev_info; | 737 | current->backing_dev_info = mapping->backing_dev_info; |
737 | 738 | ||
738 | write_retry: | 739 | write_retry: |
739 | trace_xfs_file_buffered_write(ip, count, iocb->ki_pos, 0); | 740 | trace_xfs_file_buffered_write(ip, count, iocb->ki_pos, 0); |
740 | ret = generic_file_buffered_write(iocb, iovp, nr_segs, | 741 | ret = generic_perform_write(file, &from, pos); |
741 | pos, count, 0); | 742 | if (likely(ret >= 0)) |
742 | 743 | iocb->ki_pos = pos + ret; | |
743 | /* | 744 | /* |
744 | * If we just got an ENOSPC, try to write back all dirty inodes to | 745 | * If we just got an ENOSPC, try to write back all dirty inodes to |
745 | * convert delalloc space to free up some of the excess reserved | 746 | * convert delalloc space to free up some of the excess reserved |