aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_file.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2011-08-23 04:28:13 -0400
committerAlex Elder <aelder@sgi.com>2011-10-11 22:15:01 -0400
commit4a06fd262dbeb70a2c315f7259e063efa493fe3d (patch)
treecca4aee6c419a8b3dc267176bb43d93048593919 /fs/xfs/xfs_file.c
parent2b3ffd7eb7b4392e3657c5046b055ca9f1f7cf5e (diff)
xfs: remove i_iocount
We now have an i_dio_count filed and surrounding infrastructure to wait for direct I/O completion instead of i_icount, and we have never needed to iocount waits for buffered I/O given that we only set the page uptodate after finishing all required work. Thus remove i_iocount, and replace the actually needed waits with calls to inode_dio_wait. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Alex Elder <aelder@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_file.c')
-rw-r--r--fs/xfs/xfs_file.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c
index cbbac5cc9c26..ee63c4fb3639 100644
--- a/fs/xfs/xfs_file.c
+++ b/fs/xfs/xfs_file.c
@@ -149,10 +149,6 @@ xfs_file_fsync(
149 149
150 xfs_iflags_clear(ip, XFS_ITRUNCATED); 150 xfs_iflags_clear(ip, XFS_ITRUNCATED);
151 151
152 xfs_ilock(ip, XFS_IOLOCK_SHARED);
153 xfs_ioend_wait(ip);
154 xfs_iunlock(ip, XFS_IOLOCK_SHARED);
155
156 if (mp->m_flags & XFS_MOUNT_BARRIER) { 152 if (mp->m_flags & XFS_MOUNT_BARRIER) {
157 /* 153 /*
158 * If we have an RT and/or log subvolume we need to make sure 154 * If we have an RT and/or log subvolume we need to make sure
@@ -758,7 +754,7 @@ restart:
758 * the dio layer. To avoid the problem with aio, we also need to wait for 754 * the dio layer. To avoid the problem with aio, we also need to wait for
759 * outstanding IOs to complete so that unwritten extent conversion is completed 755 * outstanding IOs to complete so that unwritten extent conversion is completed
760 * before we try to map the overlapping block. This is currently implemented by 756 * before we try to map the overlapping block. This is currently implemented by
761 * hitting it with a big hammer (i.e. xfs_ioend_wait()). 757 * hitting it with a big hammer (i.e. inode_dio_wait()).
762 * 758 *
763 * Returns with locks held indicated by @iolock and errors indicated by 759 * Returns with locks held indicated by @iolock and errors indicated by
764 * negative return values. 760 * negative return values.
@@ -821,7 +817,7 @@ xfs_file_dio_aio_write(
821 * otherwise demote the lock if we had to flush cached pages 817 * otherwise demote the lock if we had to flush cached pages
822 */ 818 */
823 if (unaligned_io) 819 if (unaligned_io)
824 xfs_ioend_wait(ip); 820 inode_dio_wait(inode);
825 else if (*iolock == XFS_IOLOCK_EXCL) { 821 else if (*iolock == XFS_IOLOCK_EXCL) {
826 xfs_rw_ilock_demote(ip, XFS_IOLOCK_EXCL); 822 xfs_rw_ilock_demote(ip, XFS_IOLOCK_EXCL);
827 *iolock = XFS_IOLOCK_SHARED; 823 *iolock = XFS_IOLOCK_SHARED;