diff options
author | Christoph Hellwig <hch@lst.de> | 2009-01-19 02:03:19 +0100 |
---|---|---|
committer | Christoph Hellwig <hch@brick.lst.de> | 2009-01-19 02:03:19 +0100 |
commit | 5bb87a33b2cfb8e7ef3383718274094bdff266a3 (patch) | |
tree | 7917b0354e01dde2fc321a48214f72333aab3073 /fs/xfs/quota/xfs_dquot.h | |
parent | a4edd1da20af79b2e92efeee3ca94831c8024d61 (diff) | |
download | lwn-5bb87a33b2cfb8e7ef3383718274094bdff266a3.tar.gz lwn-5bb87a33b2cfb8e7ef3383718274094bdff266a3.zip |
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 { #define dq_hashlist q_lists.dqm_hashlist #define dq_flags q_lists.dqm_flags +/* + * Lock hierachy for q_qlock: + * XFS_QLOCK_NORMAL is the implicit default, + * XFS_QLOCK_NESTED is the dquot with the higher id in xfs_dqlock2 + */ +enum { + XFS_QLOCK_NORMAL = 0, + XFS_QLOCK_NESTED, +}; + #define XFS_DQHOLD(dqp) ((dqp)->q_nrefs++) #ifdef DEBUG |