diff options
author | Lachlan McIlroy <lachlan@sgi.com> | 2007-05-07 23:50:19 -0400 |
---|---|---|
committer | Tim Shimmin <tes@sgi.com> | 2007-05-07 23:50:19 -0400 |
commit | f7c66ce3f70d8417de0cfb481ca4e5430382ec5d (patch) | |
tree | c9b4d5cb09a9241cb305532edfbd703cd181530d /fs/xfs/xfs_iget.c | |
parent | 71dfd5a396d11512aa6c8ed0d35b268bc084bb9b (diff) |
[XFS] Add lockdep support for XFS
SGI-PV: 963965
SGI-Modid: xfs-linux-melb:xfs-kern:28485a
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_iget.c')
-rw-r--r-- | fs/xfs/xfs_iget.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/fs/xfs/xfs_iget.c b/fs/xfs/xfs_iget.c index c1c89dac19cc..114433a22baa 100644 --- a/fs/xfs/xfs_iget.c +++ b/fs/xfs/xfs_iget.c | |||
@@ -879,17 +879,17 @@ xfs_ilock(xfs_inode_t *ip, | |||
879 | (XFS_IOLOCK_SHARED | XFS_IOLOCK_EXCL)); | 879 | (XFS_IOLOCK_SHARED | XFS_IOLOCK_EXCL)); |
880 | ASSERT((lock_flags & (XFS_ILOCK_SHARED | XFS_ILOCK_EXCL)) != | 880 | ASSERT((lock_flags & (XFS_ILOCK_SHARED | XFS_ILOCK_EXCL)) != |
881 | (XFS_ILOCK_SHARED | XFS_ILOCK_EXCL)); | 881 | (XFS_ILOCK_SHARED | XFS_ILOCK_EXCL)); |
882 | ASSERT((lock_flags & ~XFS_LOCK_MASK) == 0); | 882 | ASSERT((lock_flags & ~(XFS_LOCK_MASK | XFS_LOCK_DEP_MASK)) == 0); |
883 | 883 | ||
884 | if (lock_flags & XFS_IOLOCK_EXCL) { | 884 | if (lock_flags & XFS_IOLOCK_EXCL) { |
885 | mrupdate(&ip->i_iolock); | 885 | mrupdate_nested(&ip->i_iolock, XFS_IOLOCK_DEP(lock_flags)); |
886 | } else if (lock_flags & XFS_IOLOCK_SHARED) { | 886 | } else if (lock_flags & XFS_IOLOCK_SHARED) { |
887 | mraccess(&ip->i_iolock); | 887 | mraccess_nested(&ip->i_iolock, XFS_IOLOCK_DEP(lock_flags)); |
888 | } | 888 | } |
889 | if (lock_flags & XFS_ILOCK_EXCL) { | 889 | if (lock_flags & XFS_ILOCK_EXCL) { |
890 | mrupdate(&ip->i_lock); | 890 | mrupdate_nested(&ip->i_lock, XFS_ILOCK_DEP(lock_flags)); |
891 | } else if (lock_flags & XFS_ILOCK_SHARED) { | 891 | } else if (lock_flags & XFS_ILOCK_SHARED) { |
892 | mraccess(&ip->i_lock); | 892 | mraccess_nested(&ip->i_lock, XFS_ILOCK_DEP(lock_flags)); |
893 | } | 893 | } |
894 | xfs_ilock_trace(ip, 1, lock_flags, (inst_t *)__return_address); | 894 | xfs_ilock_trace(ip, 1, lock_flags, (inst_t *)__return_address); |
895 | } | 895 | } |
@@ -923,7 +923,7 @@ xfs_ilock_nowait(xfs_inode_t *ip, | |||
923 | (XFS_IOLOCK_SHARED | XFS_IOLOCK_EXCL)); | 923 | (XFS_IOLOCK_SHARED | XFS_IOLOCK_EXCL)); |
924 | ASSERT((lock_flags & (XFS_ILOCK_SHARED | XFS_ILOCK_EXCL)) != | 924 | ASSERT((lock_flags & (XFS_ILOCK_SHARED | XFS_ILOCK_EXCL)) != |
925 | (XFS_ILOCK_SHARED | XFS_ILOCK_EXCL)); | 925 | (XFS_ILOCK_SHARED | XFS_ILOCK_EXCL)); |
926 | ASSERT((lock_flags & ~XFS_LOCK_MASK) == 0); | 926 | ASSERT((lock_flags & ~(XFS_LOCK_MASK | XFS_LOCK_DEP_MASK)) == 0); |
927 | 927 | ||
928 | iolocked = 0; | 928 | iolocked = 0; |
929 | if (lock_flags & XFS_IOLOCK_EXCL) { | 929 | if (lock_flags & XFS_IOLOCK_EXCL) { |
@@ -983,7 +983,8 @@ xfs_iunlock(xfs_inode_t *ip, | |||
983 | (XFS_IOLOCK_SHARED | XFS_IOLOCK_EXCL)); | 983 | (XFS_IOLOCK_SHARED | XFS_IOLOCK_EXCL)); |
984 | ASSERT((lock_flags & (XFS_ILOCK_SHARED | XFS_ILOCK_EXCL)) != | 984 | ASSERT((lock_flags & (XFS_ILOCK_SHARED | XFS_ILOCK_EXCL)) != |
985 | (XFS_ILOCK_SHARED | XFS_ILOCK_EXCL)); | 985 | (XFS_ILOCK_SHARED | XFS_ILOCK_EXCL)); |
986 | ASSERT((lock_flags & ~(XFS_LOCK_MASK | XFS_IUNLOCK_NONOTIFY)) == 0); | 986 | ASSERT((lock_flags & ~(XFS_LOCK_MASK | XFS_IUNLOCK_NONOTIFY | |
987 | XFS_LOCK_DEP_MASK)) == 0); | ||
987 | ASSERT(lock_flags != 0); | 988 | ASSERT(lock_flags != 0); |
988 | 989 | ||
989 | if (lock_flags & (XFS_IOLOCK_SHARED | XFS_IOLOCK_EXCL)) { | 990 | if (lock_flags & (XFS_IOLOCK_SHARED | XFS_IOLOCK_EXCL)) { |