diff options
| author | Herbert Xu <herbert@gondor.apana.org.au> | 2014-11-13 05:11:22 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2014-11-13 15:13:05 -0500 |
| commit | 7b4ce2353467fdab6e003be7a3129fb09b09deac (patch) | |
| tree | 9e5d9d20cf30672d2db081a0de8604ad47680e49 /include/linux | |
| parent | 1b2f309d70daf04b6a97b3753e375654532f6207 (diff) | |
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>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/rhashtable.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/rhashtable.h b/include/linux/rhashtable.h index 96ce8ceff554..473e26bdb91d 100644 --- a/include/linux/rhashtable.h +++ b/include/linux/rhashtable.h | |||
| @@ -66,7 +66,8 @@ struct rhashtable_params { | |||
| 66 | bool (*shrink_decision)(const struct rhashtable *ht, | 66 | bool (*shrink_decision)(const struct rhashtable *ht, |
| 67 | size_t new_size); | 67 | size_t new_size); |
| 68 | #ifdef CONFIG_PROVE_LOCKING | 68 | #ifdef CONFIG_PROVE_LOCKING |
| 69 | int (*mutex_is_held)(void); | 69 | int (*mutex_is_held)(void *parent); |
| 70 | void *parent; | ||
| 70 | #endif | 71 | #endif |
| 71 | }; | 72 | }; |
| 72 | 73 | ||
