mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 19:30:52 +07:00
xfs: add a lock class for group/project dquots
We can have both a user and a group/project dquot locked at the same time, as long as the user dquot is locked first. Tell lockdep about that fact by making the group/project dquots a different lock class. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
parent
4f2d4ac6e5
commit
5aa2dc0a06
@ -73,6 +73,8 @@ int xfs_dqreq_num;
|
|||||||
int xfs_dqerror_mod = 33;
|
int xfs_dqerror_mod = 33;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static struct lock_class_key xfs_dquot_other_class;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Allocate and initialize a dquot. We don't always allocate fresh memory;
|
* Allocate and initialize a dquot. We don't always allocate fresh memory;
|
||||||
* we try to reclaim a free dquot if the number of incore dquots are above
|
* we try to reclaim a free dquot if the number of incore dquots are above
|
||||||
@ -139,7 +141,15 @@ xfs_qm_dqinit(
|
|||||||
ASSERT(dqp->q_trace);
|
ASSERT(dqp->q_trace);
|
||||||
xfs_dqtrace_entry(dqp, "DQRECLAIMED_INIT");
|
xfs_dqtrace_entry(dqp, "DQRECLAIMED_INIT");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* In either case we need to make sure group quotas have a different
|
||||||
|
* lock class than user quotas, to make sure lockdep knows we can
|
||||||
|
* locks of one of each at the same time.
|
||||||
|
*/
|
||||||
|
if (!(type & XFS_DQ_USER))
|
||||||
|
lockdep_set_class(&dqp->q_qlock, &xfs_dquot_other_class);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* log item gets initialized later
|
* log item gets initialized later
|
||||||
|
Loading…
Reference in New Issue
Block a user