aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_vnodeops.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2009-02-04 03:36:19 -0500
committerChristoph Hellwig <hch@brick.lst.de>2009-02-04 03:36:19 -0500
commitd4bb6d0698090c485e2e80e8a13852be5a8bfb04 (patch)
treebc94a63f218d64976e11d67c6b8d6f0f2859d2c4 /fs/xfs/xfs_vnodeops.c
parente1486dea0bf4bc75a52a983281076f454a894b66 (diff)
xfs: merge xfs_inode_flush into xfs_fs_write_inode
Splitting the task for a VFS-induced inode flush into two functions doesn't make any sense, so merge the two functions dealing with it. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Felix Blyakher <felixb@sgi.com> Reviewed-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_vnodeops.c')
-rw-r--r--fs/xfs/xfs_vnodeops.c45
1 files changed, 0 insertions, 45 deletions
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c
index 4229408664ea..bc0a0a75b1d6 100644
--- a/fs/xfs/xfs_vnodeops.c
+++ b/fs/xfs/xfs_vnodeops.c
@@ -2589,51 +2589,6 @@ std_return:
2589} 2589}
2590 2590
2591int 2591int
2592xfs_inode_flush(
2593 xfs_inode_t *ip,
2594 int flags)
2595{
2596 xfs_mount_t *mp = ip->i_mount;
2597 int error = 0;
2598
2599 if (XFS_FORCED_SHUTDOWN(mp))
2600 return XFS_ERROR(EIO);
2601
2602 /*
2603 * Bypass inodes which have already been cleaned by
2604 * the inode flush clustering code inside xfs_iflush
2605 */
2606 if (xfs_inode_clean(ip))
2607 return 0;
2608
2609 /*
2610 * We make this non-blocking if the inode is contended,
2611 * return EAGAIN to indicate to the caller that they
2612 * did not succeed. This prevents the flush path from
2613 * blocking on inodes inside another operation right
2614 * now, they get caught later by xfs_sync.
2615 */
2616 if (flags & FLUSH_SYNC) {
2617 xfs_ilock(ip, XFS_ILOCK_SHARED);
2618 xfs_iflock(ip);
2619 } else if (xfs_ilock_nowait(ip, XFS_ILOCK_SHARED)) {
2620 if (xfs_ipincount(ip) || !xfs_iflock_nowait(ip)) {
2621 xfs_iunlock(ip, XFS_ILOCK_SHARED);
2622 return EAGAIN;
2623 }
2624 } else {
2625 return EAGAIN;
2626 }
2627
2628 error = xfs_iflush(ip, (flags & FLUSH_SYNC) ? XFS_IFLUSH_SYNC
2629 : XFS_IFLUSH_ASYNC_NOBLOCK);
2630 xfs_iunlock(ip, XFS_ILOCK_SHARED);
2631
2632 return error;
2633}
2634
2635
2636int
2637xfs_set_dmattrs( 2592xfs_set_dmattrs(
2638 xfs_inode_t *ip, 2593 xfs_inode_t *ip,
2639 u_int evmask, 2594 u_int evmask,