diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2014-11-13 18:11:19 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-11-13 15:13:05 -0500 |
commit | 1f501d62523f0d5fd152006e16938ee674932c1b (patch) | |
tree | 6e678b550e827e78673bd4e4c8e59c5b8e24a097 | |
parent | 971275662040beef8f73f8e5dbcfb3d76a14bf04 (diff) |
netfilter: Move mutex_is_held under PROVE_LOCKING
The rhashtable function mutex_is_held is only used when PROVE_LOCKING
is enabled. This patch modifies netfilter so that we can rhashtable.h
itself can later make mutex_is_held optional depending on PROVE_LOCKING.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/netfilter/nft_hash.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/netfilter/nft_hash.c b/net/netfilter/nft_hash.c index 8892b7b6184a..b86305c86048 100644 --- a/net/netfilter/nft_hash.c +++ b/net/netfilter/nft_hash.c @@ -153,10 +153,12 @@ static unsigned int nft_hash_privsize(const struct nlattr * const nla[]) return sizeof(struct rhashtable); } +#ifdef CONFIG_PROVE_LOCKING static int lockdep_nfnl_lock_is_held(void) { return lockdep_nfnl_is_held(NFNL_SUBSYS_NFTABLES); } +#endif static int nft_hash_init(const struct nft_set *set, const struct nft_set_desc *desc, @@ -171,7 +173,9 @@ static int nft_hash_init(const struct nft_set *set, .hashfn = jhash, .grow_decision = rht_grow_above_75, .shrink_decision = rht_shrink_below_30, +#ifdef CONFIG_PROVE_LOCKING .mutex_is_held = lockdep_nfnl_lock_is_held, +#endif }; return rhashtable_init(priv, ¶ms); |