aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_sync.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_sync.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_sync.c')
-rw-r--r--fs/xfs/xfs_sync.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/xfs/xfs_sync.c b/fs/xfs/xfs_sync.c
index 90cc197e0433..bf2b38c21caa 100644
--- a/fs/xfs/xfs_sync.c
+++ b/fs/xfs/xfs_sync.c
@@ -227,21 +227,17 @@ xfs_sync_inode_data(
227 int error = 0; 227 int error = 0;
228 228
229 if (!mapping_tagged(mapping, PAGECACHE_TAG_DIRTY)) 229 if (!mapping_tagged(mapping, PAGECACHE_TAG_DIRTY))
230 goto out_wait; 230 return 0;
231 231
232 if (!xfs_ilock_nowait(ip, XFS_IOLOCK_SHARED)) { 232 if (!xfs_ilock_nowait(ip, XFS_IOLOCK_SHARED)) {
233 if (flags & SYNC_TRYLOCK) 233 if (flags & SYNC_TRYLOCK)
234 goto out_wait; 234 return 0;
235 xfs_ilock(ip, XFS_IOLOCK_SHARED); 235 xfs_ilock(ip, XFS_IOLOCK_SHARED);
236 } 236 }
237 237
238 error = xfs_flush_pages(ip, 0, -1, (flags & SYNC_WAIT) ? 238 error = xfs_flush_pages(ip, 0, -1, (flags & SYNC_WAIT) ?
239 0 : XBF_ASYNC, FI_NONE); 239 0 : XBF_ASYNC, FI_NONE);
240 xfs_iunlock(ip, XFS_IOLOCK_SHARED); 240 xfs_iunlock(ip, XFS_IOLOCK_SHARED);
241
242 out_wait:
243 if (flags & SYNC_WAIT)
244 xfs_ioend_wait(ip);
245 return error; 241 return error;
246} 242}
247 243