summaryrefslogtreecommitdiffstats
path: root/net/netlabel/netlabel_mgmt.c
diff options
context:
space:
mode:
authorPaul Moore2007-10-26 13:29:08 +0200
committerDavid S. Miller2007-10-26 13:29:08 +0200
commit4be2700fb7b95f2a7cef9324879cafccab8774fc (patch)
tree8e3839c4e1c23c7d2b105f9ea45fb0891e3f0312 /net/netlabel/netlabel_mgmt.c
parent[TCP]: fix D-SACK cwnd handling (diff)
downloadkernel-qcow2-linux-4be2700fb7b95f2a7cef9324879cafccab8774fc.tar.gz
kernel-qcow2-linux-4be2700fb7b95f2a7cef9324879cafccab8774fc.tar.xz
kernel-qcow2-linux-4be2700fb7b95f2a7cef9324879cafccab8774fc.zip
[NetLabel]: correct usage of RCU locking
This fixes some awkward, and perhaps even problematic, RCU lock usage in the NetLabel code as well as some other related trivial cleanups found when looking through the RCU locking. Most of the changes involve removing the redundant RCU read locks wrapping spinlocks in the case of a RCU writer. Signed-off-by: Paul Moore <paul.moore@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netlabel/netlabel_mgmt.c')
-rw-r--r--net/netlabel/netlabel_mgmt.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/net/netlabel/netlabel_mgmt.c b/net/netlabel/netlabel_mgmt.c
index 5315dacc5222..56483377997a 100644
--- a/net/netlabel/netlabel_mgmt.c
+++ b/net/netlabel/netlabel_mgmt.c
@@ -85,11 +85,9 @@ static const struct nla_policy netlbl_mgmt_genl_policy[NLBL_MGMT_A_MAX + 1] = {
*/
void netlbl_mgmt_protocount_inc(void)
{
- rcu_read_lock();
spin_lock(&netlabel_mgmt_protocount_lock);
netlabel_mgmt_protocount++;
spin_unlock(&netlabel_mgmt_protocount_lock);
- rcu_read_unlock();
}
/**
@@ -103,12 +101,10 @@ void netlbl_mgmt_protocount_inc(void)
*/
void netlbl_mgmt_protocount_dec(void)
{
- rcu_read_lock();
spin_lock(&netlabel_mgmt_protocount_lock);
if (netlabel_mgmt_protocount > 0)
netlabel_mgmt_protocount--;
spin_unlock(&netlabel_mgmt_protocount_lock);
- rcu_read_unlock();
}
/**