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>
This commit is contained in:

committed by
Christoph Hellwig

orang tua
a4edd1da20
melakukan
5bb87a33b2
@@ -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
|
||||
|
Reference in New Issue
Block a user