rhashtable: Add parent argument to mutex_is_held
Currently mutex_is_held can only test locks in the that are global since it takes no arguments. This prevents rhashtable from being used in places where locks are lock, e.g., per-namespace locks. This patch adds a parent field to mutex_is_held and rhashtable_params so that local locks can be used (and tested). Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
1b2f309d70
commit
7b4ce23534
@@ -66,7 +66,8 @@ struct rhashtable_params {
|
||||
bool (*shrink_decision)(const struct rhashtable *ht,
|
||||
size_t new_size);
|
||||
#ifdef CONFIG_PROVE_LOCKING
|
||||
int (*mutex_is_held)(void);
|
||||
int (*mutex_is_held)(void *parent);
|
||||
void *parent;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user