diff options
author | Christoph Hellwig <hch@infradead.org> | 2010-06-23 21:52:50 -0400 |
---|---|---|
committer | Alex Elder <aelder@sgi.com> | 2010-07-26 14:16:44 -0400 |
commit | f2d6761433d69d94e0b39ac44ef0f0f0b0508065 (patch) | |
tree | 12b33cc84c66146b9dc16f8df4884a7e6345f20f | |
parent | ef35e9255d4ed12522e836fbcec861e7306d794a (diff) |
xfs: remove xfs_iput
xfs_iput is just a small wrapper for xfs_iunlock + IRELE. Having this
out of line wrapper means the trace events in those two can't track
their caller properly. So just remove the wrapper and opencode the
unlock + rele in the few callers.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
-rw-r--r-- | fs/xfs/quota/xfs_qm.c | 6 | ||||
-rw-r--r-- | fs/xfs/quota/xfs_qm_syscalls.c | 9 | ||||
-rw-r--r-- | fs/xfs/xfs_iget.c | 17 | ||||
-rw-r--r-- | fs/xfs/xfs_inode.h | 1 | ||||
-rw-r--r-- | fs/xfs/xfs_inode_item.c | 6 | ||||
-rw-r--r-- | fs/xfs/xfs_itable.c | 4 |
6 files changed, 17 insertions, 26 deletions
diff --git a/fs/xfs/quota/xfs_qm.c b/fs/xfs/quota/xfs_qm.c index 7a33d65e2d28..9a92407109a1 100644 --- a/fs/xfs/quota/xfs_qm.c +++ b/fs/xfs/quota/xfs_qm.c | |||
@@ -1662,7 +1662,8 @@ xfs_qm_dqusage_adjust( | |||
1662 | * making us disable quotas for the file system. | 1662 | * making us disable quotas for the file system. |
1663 | */ | 1663 | */ |
1664 | if ((error = xfs_qm_dqget_noattach(ip, &udqp, &gdqp))) { | 1664 | if ((error = xfs_qm_dqget_noattach(ip, &udqp, &gdqp))) { |
1665 | xfs_iput(ip, XFS_ILOCK_EXCL); | 1665 | xfs_iunlock(ip, XFS_ILOCK_EXCL); |
1666 | IRELE(ip); | ||
1666 | *res = BULKSTAT_RV_GIVEUP; | 1667 | *res = BULKSTAT_RV_GIVEUP; |
1667 | return error; | 1668 | return error; |
1668 | } | 1669 | } |
@@ -1675,7 +1676,8 @@ xfs_qm_dqusage_adjust( | |||
1675 | * Walk thru the extent list and count the realtime blocks. | 1676 | * Walk thru the extent list and count the realtime blocks. |
1676 | */ | 1677 | */ |
1677 | if ((error = xfs_qm_get_rtblks(ip, &rtblks))) { | 1678 | if ((error = xfs_qm_get_rtblks(ip, &rtblks))) { |
1678 | xfs_iput(ip, XFS_ILOCK_EXCL); | 1679 | xfs_iunlock(ip, XFS_ILOCK_EXCL); |
1680 | IRELE(ip); | ||
1679 | if (udqp) | 1681 | if (udqp) |
1680 | xfs_qm_dqput(udqp); | 1682 | xfs_qm_dqput(udqp); |
1681 | if (gdqp) | 1683 | if (gdqp) |
diff --git a/fs/xfs/quota/xfs_qm_syscalls.c b/fs/xfs/quota/xfs_qm_syscalls.c index 98dc6feef9f1..73f2b203975e 100644 --- a/fs/xfs/quota/xfs_qm_syscalls.c +++ b/fs/xfs/quota/xfs_qm_syscalls.c | |||
@@ -865,8 +865,9 @@ xfs_dqrele_inode( | |||
865 | xfs_qm_dqrele(ip->i_gdquot); | 865 | xfs_qm_dqrele(ip->i_gdquot); |
866 | ip->i_gdquot = NULL; | 866 | ip->i_gdquot = NULL; |
867 | } | 867 | } |
868 | xfs_iput(ip, XFS_ILOCK_EXCL); | 868 | xfs_iunlock(ip, XFS_ILOCK_EXCL); |
869 | 869 | ||
870 | IRELE(ip); | ||
870 | return 0; | 871 | return 0; |
871 | } | 872 | } |
872 | 873 | ||
@@ -1133,7 +1134,8 @@ xfs_qm_internalqcheck_adjust( | |||
1133 | * of those now. | 1134 | * of those now. |
1134 | */ | 1135 | */ |
1135 | if (! ipreleased) { | 1136 | if (! ipreleased) { |
1136 | xfs_iput(ip, lock_flags); | 1137 | xfs_iunlock(ip, lock_flags); |
1138 | IRELE(ip); | ||
1137 | ipreleased = B_TRUE; | 1139 | ipreleased = B_TRUE; |
1138 | goto again; | 1140 | goto again; |
1139 | } | 1141 | } |
@@ -1150,7 +1152,8 @@ xfs_qm_internalqcheck_adjust( | |||
1150 | ASSERT(gd); | 1152 | ASSERT(gd); |
1151 | xfs_qm_internalqcheck_dqadjust(ip, gd); | 1153 | xfs_qm_internalqcheck_dqadjust(ip, gd); |
1152 | } | 1154 | } |
1153 | xfs_iput(ip, lock_flags); | 1155 | xfs_iunlock(ip, lock_flags); |
1156 | IRELE(ip); | ||
1154 | *res = BULKSTAT_RV_DIDONE; | 1157 | *res = BULKSTAT_RV_DIDONE; |
1155 | return (0); | 1158 | return (0); |
1156 | } | 1159 | } |
diff --git a/fs/xfs/xfs_iget.c b/fs/xfs/xfs_iget.c index b460e62bcf86..9e86f2116aa8 100644 --- a/fs/xfs/xfs_iget.c +++ b/fs/xfs/xfs_iget.c | |||
@@ -418,23 +418,6 @@ out_error_or_again: | |||
418 | } | 418 | } |
419 | 419 | ||
420 | /* | 420 | /* |
421 | * Decrement reference count of an inode structure and unlock it. | ||
422 | * | ||
423 | * ip -- the inode being released | ||
424 | * lock_flags -- this parameter indicates the inode's locks to be | ||
425 | * to be released. See the comment on xfs_iunlock() for a list | ||
426 | * of valid values. | ||
427 | */ | ||
428 | void | ||
429 | xfs_iput(xfs_inode_t *ip, | ||
430 | uint lock_flags) | ||
431 | { | ||
432 | xfs_itrace_entry(ip); | ||
433 | xfs_iunlock(ip, lock_flags); | ||
434 | IRELE(ip); | ||
435 | } | ||
436 | |||
437 | /* | ||
438 | * This is called free all the memory associated with an inode. | 421 | * This is called free all the memory associated with an inode. |
439 | * It must free the inode itself and any buffers allocated for | 422 | * It must free the inode itself and any buffers allocated for |
440 | * if_extents/if_data and if_broot. It must also free the lock | 423 | * if_extents/if_data and if_broot. It must also free the lock |
diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h index 7a19d5237656..eb41559ea8cd 100644 --- a/fs/xfs/xfs_inode.h +++ b/fs/xfs/xfs_inode.h | |||
@@ -443,7 +443,6 @@ static inline void xfs_ifunlock(xfs_inode_t *ip) | |||
443 | */ | 443 | */ |
444 | int xfs_iget(struct xfs_mount *, struct xfs_trans *, xfs_ino_t, | 444 | int xfs_iget(struct xfs_mount *, struct xfs_trans *, xfs_ino_t, |
445 | uint, uint, xfs_inode_t **); | 445 | uint, uint, xfs_inode_t **); |
446 | void xfs_iput(xfs_inode_t *, uint); | ||
447 | void xfs_ilock(xfs_inode_t *, uint); | 446 | void xfs_ilock(xfs_inode_t *, uint); |
448 | int xfs_ilock_nowait(xfs_inode_t *, uint); | 447 | int xfs_ilock_nowait(xfs_inode_t *, uint); |
449 | void xfs_iunlock(xfs_inode_t *, uint); | 448 | void xfs_iunlock(xfs_inode_t *, uint); |
diff --git a/fs/xfs/xfs_inode_item.c b/fs/xfs/xfs_inode_item.c index 2998b2cb7466..065c1ad9b708 100644 --- a/fs/xfs/xfs_inode_item.c +++ b/fs/xfs/xfs_inode_item.c | |||
@@ -660,8 +660,10 @@ xfs_inode_item_unlock( | |||
660 | 660 | ||
661 | lock_flags = iip->ili_lock_flags; | 661 | lock_flags = iip->ili_lock_flags; |
662 | iip->ili_lock_flags = 0; | 662 | iip->ili_lock_flags = 0; |
663 | if (lock_flags) | 663 | if (lock_flags) { |
664 | xfs_iput(iip->ili_inode, lock_flags); | 664 | xfs_iunlock(iip->ili_inode, lock_flags); |
665 | IRELE(iip->ili_inode); | ||
666 | } | ||
665 | } | 667 | } |
666 | 668 | ||
667 | /* | 669 | /* |
diff --git a/fs/xfs/xfs_itable.c b/fs/xfs/xfs_itable.c index 200dc6fc8cc5..7e3626e5925c 100644 --- a/fs/xfs/xfs_itable.c +++ b/fs/xfs/xfs_itable.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include "xfs_itable.h" | 34 | #include "xfs_itable.h" |
35 | #include "xfs_error.h" | 35 | #include "xfs_error.h" |
36 | #include "xfs_btree.h" | 36 | #include "xfs_btree.h" |
37 | #include "xfs_trace.h" | ||
37 | 38 | ||
38 | STATIC int | 39 | STATIC int |
39 | xfs_internal_inum( | 40 | xfs_internal_inum( |
@@ -139,7 +140,8 @@ xfs_bulkstat_one_int( | |||
139 | buf->bs_blocks = dic->di_nblocks + ip->i_delayed_blks; | 140 | buf->bs_blocks = dic->di_nblocks + ip->i_delayed_blks; |
140 | break; | 141 | break; |
141 | } | 142 | } |
142 | xfs_iput(ip, XFS_ILOCK_SHARED); | 143 | xfs_iunlock(ip, XFS_ILOCK_SHARED); |
144 | IRELE(ip); | ||
143 | 145 | ||
144 | error = formatter(buffer, ubsize, ubused, buf); | 146 | error = formatter(buffer, ubsize, ubused, buf); |
145 | 147 | ||