aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_inode.c
diff options
context:
space:
mode:
authorDavid Chinner <david@fromorbit.com>2008-08-13 02:41:16 -0400
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2008-08-13 02:41:16 -0400
commitc63942d3eeffb98219e05d0976862ab9907d297d (patch)
tree2f00c2aa9df30c3e91c06aa46c5722382093c5de /fs/xfs/xfs_inode.c
parent39d2f1ab2a36ac527a6c41cfe689f50c239eaca3 (diff)
[XFS] replace inode flush semaphore with a completion
Use the new completion flush code to implement the inode flush lock. Removes one of the final users of semaphores in the XFS code base. SGI-PV: 981498 SGI-Modid: xfs-linux-melb:xfs-kern:31817a Signed-off-by: David Chinner <david@fromorbit.com> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_inode.c')
-rw-r--r--fs/xfs/xfs_inode.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index b8444ee4dc95..aea62222b3a1 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -2626,7 +2626,6 @@ xfs_idestroy(
2626 xfs_idestroy_fork(ip, XFS_ATTR_FORK); 2626 xfs_idestroy_fork(ip, XFS_ATTR_FORK);
2627 mrfree(&ip->i_lock); 2627 mrfree(&ip->i_lock);
2628 mrfree(&ip->i_iolock); 2628 mrfree(&ip->i_iolock);
2629 freesema(&ip->i_flock);
2630 2629
2631#ifdef XFS_INODE_TRACE 2630#ifdef XFS_INODE_TRACE
2632 ktrace_free(ip->i_trace); 2631 ktrace_free(ip->i_trace);
@@ -3044,10 +3043,10 @@ cluster_corrupt_out:
3044/* 3043/*
3045 * xfs_iflush() will write a modified inode's changes out to the 3044 * xfs_iflush() will write a modified inode's changes out to the
3046 * inode's on disk home. The caller must have the inode lock held 3045 * inode's on disk home. The caller must have the inode lock held
3047 * in at least shared mode and the inode flush semaphore must be 3046 * in at least shared mode and the inode flush completion must be
3048 * held as well. The inode lock will still be held upon return from 3047 * active as well. The inode lock will still be held upon return from
3049 * the call and the caller is free to unlock it. 3048 * the call and the caller is free to unlock it.
3050 * The inode flush lock will be unlocked when the inode reaches the disk. 3049 * The inode flush will be completed when the inode reaches the disk.
3051 * The flags indicate how the inode's buffer should be written out. 3050 * The flags indicate how the inode's buffer should be written out.
3052 */ 3051 */
3053int 3052int
@@ -3066,7 +3065,7 @@ xfs_iflush(
3066 XFS_STATS_INC(xs_iflush_count); 3065 XFS_STATS_INC(xs_iflush_count);
3067 3066
3068 ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL|XFS_ILOCK_SHARED)); 3067 ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL|XFS_ILOCK_SHARED));
3069 ASSERT(issemalocked(&(ip->i_flock))); 3068 ASSERT(!completion_done(&ip->i_flush));
3070 ASSERT(ip->i_d.di_format != XFS_DINODE_FMT_BTREE || 3069 ASSERT(ip->i_d.di_format != XFS_DINODE_FMT_BTREE ||
3071 ip->i_d.di_nextents > ip->i_df.if_ext_max); 3070 ip->i_d.di_nextents > ip->i_df.if_ext_max);
3072 3071
@@ -3229,7 +3228,7 @@ xfs_iflush_int(
3229#endif 3228#endif
3230 3229
3231 ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL|XFS_ILOCK_SHARED)); 3230 ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL|XFS_ILOCK_SHARED));
3232 ASSERT(issemalocked(&(ip->i_flock))); 3231 ASSERT(!completion_done(&ip->i_flush));
3233 ASSERT(ip->i_d.di_format != XFS_DINODE_FMT_BTREE || 3232 ASSERT(ip->i_d.di_format != XFS_DINODE_FMT_BTREE ||
3234 ip->i_d.di_nextents > ip->i_df.if_ext_max); 3233 ip->i_d.di_nextents > ip->i_df.if_ext_max);
3235 3234