diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2006-06-18 18:41:30 -0400 |
---|---|---|
committer | Nathan Scott <nathans@sgi.com> | 2006-06-18 18:41:30 -0400 |
commit | 0d8fee3270f8a5e4bf95fbed3e81e21b57f8a5a0 (patch) | |
tree | e965874962259a2f16980f19a4e5c03ef635a86f /fs/xfs/xfs_inode_item.c | |
parent | a805bad5daae8d4f92ce46f467484d4867e996d4 (diff) |
[XFS] Kill direct access to ->count in valusema(); all we ever use it for
is check if semaphore is actually locked, which can be trivially done in
portable way. Code gets more reabable, while we are at it...
SGI-PV: 953915
SGI-Modid: xfs-linux-melb:xfs-kern:26274a
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_inode_item.c')
-rw-r--r-- | fs/xfs/xfs_inode_item.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/xfs/xfs_inode_item.c b/fs/xfs/xfs_inode_item.c index cd65a565b4fe..2caa91b89714 100644 --- a/fs/xfs/xfs_inode_item.c +++ b/fs/xfs/xfs_inode_item.c | |||
@@ -794,7 +794,7 @@ xfs_inode_item_pushbuf( | |||
794 | * inode flush completed and the inode was taken off the AIL. | 794 | * inode flush completed and the inode was taken off the AIL. |
795 | * So, just get out. | 795 | * So, just get out. |
796 | */ | 796 | */ |
797 | if ((valusema(&(ip->i_flock)) > 0) || | 797 | if (!issemalocked(&(ip->i_flock)) || |
798 | ((iip->ili_item.li_flags & XFS_LI_IN_AIL) == 0)) { | 798 | ((iip->ili_item.li_flags & XFS_LI_IN_AIL) == 0)) { |
799 | iip->ili_pushbuf_flag = 0; | 799 | iip->ili_pushbuf_flag = 0; |
800 | xfs_iunlock(ip, XFS_ILOCK_SHARED); | 800 | xfs_iunlock(ip, XFS_ILOCK_SHARED); |
@@ -816,7 +816,7 @@ xfs_inode_item_pushbuf( | |||
816 | * If not, we can flush it async. | 816 | * If not, we can flush it async. |
817 | */ | 817 | */ |
818 | dopush = ((iip->ili_item.li_flags & XFS_LI_IN_AIL) && | 818 | dopush = ((iip->ili_item.li_flags & XFS_LI_IN_AIL) && |
819 | (valusema(&(ip->i_flock)) <= 0)); | 819 | issemalocked(&(ip->i_flock))); |
820 | iip->ili_pushbuf_flag = 0; | 820 | iip->ili_pushbuf_flag = 0; |
821 | xfs_iunlock(ip, XFS_ILOCK_SHARED); | 821 | xfs_iunlock(ip, XFS_ILOCK_SHARED); |
822 | xfs_buftrace("INODE ITEM PUSH", bp); | 822 | xfs_buftrace("INODE ITEM PUSH", bp); |
@@ -864,7 +864,7 @@ xfs_inode_item_push( | |||
864 | ip = iip->ili_inode; | 864 | ip = iip->ili_inode; |
865 | 865 | ||
866 | ASSERT(ismrlocked(&(ip->i_lock), MR_ACCESS)); | 866 | ASSERT(ismrlocked(&(ip->i_lock), MR_ACCESS)); |
867 | ASSERT(valusema(&(ip->i_flock)) <= 0); | 867 | ASSERT(issemalocked(&(ip->i_flock))); |
868 | /* | 868 | /* |
869 | * Since we were able to lock the inode's flush lock and | 869 | * Since we were able to lock the inode's flush lock and |
870 | * we found it on the AIL, the inode must be dirty. This | 870 | * we found it on the AIL, the inode must be dirty. This |