diff options
author | Christoph Hellwig <hch@lst.de> | 2009-01-18 20:03:19 -0500 |
---|---|---|
committer | Christoph Hellwig <hch@brick.lst.de> | 2009-01-18 20:03:19 -0500 |
commit | 5bb87a33b2cfb8e7ef3383718274094bdff266a3 (patch) | |
tree | 7917b0354e01dde2fc321a48214f72333aab3073 /fs/xfs/quota/xfs_dquot.h | |
parent | a4edd1da20af79b2e92efeee3ca94831c8024d61 (diff) |
xfs: lockdep annotations for xfs_dqlock2
xfs_dqlock2 locks two xfs_dquots, which is fine as it always locks the
dquot with the lower id first. Use mutex_lock_nested to tell lockdep
about this fact.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/quota/xfs_dquot.h')
-rw-r--r-- | fs/xfs/quota/xfs_dquot.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/xfs/quota/xfs_dquot.h b/fs/xfs/quota/xfs_dquot.h index 7e455337e2ba..d443e93b4331 100644 --- a/fs/xfs/quota/xfs_dquot.h +++ b/fs/xfs/quota/xfs_dquot.h | |||
@@ -97,6 +97,16 @@ typedef struct xfs_dquot { | |||
97 | #define dq_hashlist q_lists.dqm_hashlist | 97 | #define dq_hashlist q_lists.dqm_hashlist |
98 | #define dq_flags q_lists.dqm_flags | 98 | #define dq_flags q_lists.dqm_flags |
99 | 99 | ||
100 | /* | ||
101 | * Lock hierachy for q_qlock: | ||
102 | * XFS_QLOCK_NORMAL is the implicit default, | ||
103 | * XFS_QLOCK_NESTED is the dquot with the higher id in xfs_dqlock2 | ||
104 | */ | ||
105 | enum { | ||
106 | XFS_QLOCK_NORMAL = 0, | ||
107 | XFS_QLOCK_NESTED, | ||
108 | }; | ||
109 | |||
100 | #define XFS_DQHOLD(dqp) ((dqp)->q_nrefs++) | 110 | #define XFS_DQHOLD(dqp) ((dqp)->q_nrefs++) |
101 | 111 | ||
102 | #ifdef DEBUG | 112 | #ifdef DEBUG |