aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_inode.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2010-02-18 07:43:22 -0500
committerAlex Elder <aelder@sgi.com>2010-03-01 17:35:56 -0500
commita14a5ab58f9d783ec3a2a287320fab22e1764813 (patch)
tree52d0a4cbaa9aa4fe2e711cf5a68ba9fe6c2e677c /fs/xfs/xfs_inode.c
parent60ec678371183f6e0d487e55fe8adbb33816518e (diff)
xfs: remove xfs_ipin/xfs_iunpin
Inodes are only pinned/unpinned via the inode item methods, and lots of code relies on that fact. So remove the separate xfs_ipin/xfs_iunpin helpers and merge them into their only callers. This also fixes up various duplicate and/or incorrect comments. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <david@fromorbit.com> Signed-off-by: Alex Elder <aelder@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_inode.c')
-rw-r--r--fs/xfs/xfs_inode.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index 16c3968c1bbe..0ffd56447045 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -2439,34 +2439,6 @@ xfs_idestroy_fork(
2439} 2439}
2440 2440
2441/* 2441/*
2442 * Increment the pin count of the given buffer.
2443 * This value is protected by ipinlock spinlock in the mount structure.
2444 */
2445void
2446xfs_ipin(
2447 xfs_inode_t *ip)
2448{
2449 ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL));
2450
2451 atomic_inc(&ip->i_pincount);
2452}
2453
2454/*
2455 * Decrement the pin count of the given inode, and wake up
2456 * anyone in xfs_iwait_unpin() if the count goes to 0. The
2457 * inode must have been previously pinned with a call to xfs_ipin().
2458 */
2459void
2460xfs_iunpin(
2461 xfs_inode_t *ip)
2462{
2463 ASSERT(atomic_read(&ip->i_pincount) > 0);
2464
2465 if (atomic_dec_and_test(&ip->i_pincount))
2466 wake_up(&ip->i_ipin_wait);
2467}
2468
2469/*
2470 * This is called to unpin an inode. The caller must have the inode locked 2442 * This is called to unpin an inode. The caller must have the inode locked
2471 * in at least shared mode so that the buffer cannot be subsequently pinned 2443 * in at least shared mode so that the buffer cannot be subsequently pinned
2472 * once someone is waiting for it to be unpinned. 2444 * once someone is waiting for it to be unpinned.