diff options
author | Paul Moore <paul.moore@hp.com> | 2008-01-29 08:37:52 -0500 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2008-01-29 16:17:16 -0500 |
commit | c783f1ce5712530ba404807c55d77ac782eb8a7d (patch) | |
tree | 3153ec98b5c6d57eb5a0aad43389d4faa6d63586 /net/netlabel/netlabel_cipso_v4.c | |
parent | 0ba6c33bcddc64a54b5f1c25a696c4767dc76292 (diff) |
NetLabel: Remove unneeded RCU read locks
This patch removes some unneeded RCU read locks as we can treat the reads as
"safe" even without RCU. It also converts the NetLabel configuration refcount
from a spinlock protected u32 into atomic_t to be more consistent with the rest
of the kernel.
Signed-off-by: Paul Moore <paul.moore@hp.com>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'net/netlabel/netlabel_cipso_v4.c')
-rw-r--r-- | net/netlabel/netlabel_cipso_v4.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/netlabel/netlabel_cipso_v4.c b/net/netlabel/netlabel_cipso_v4.c index ba0ca8d3f77d..becf91a952ae 100644 --- a/net/netlabel/netlabel_cipso_v4.c +++ b/net/netlabel/netlabel_cipso_v4.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <net/genetlink.h> | 38 | #include <net/genetlink.h> |
39 | #include <net/netlabel.h> | 39 | #include <net/netlabel.h> |
40 | #include <net/cipso_ipv4.h> | 40 | #include <net/cipso_ipv4.h> |
41 | #include <asm/atomic.h> | ||
41 | 42 | ||
42 | #include "netlabel_user.h" | 43 | #include "netlabel_user.h" |
43 | #include "netlabel_cipso_v4.h" | 44 | #include "netlabel_cipso_v4.h" |
@@ -421,7 +422,7 @@ static int netlbl_cipsov4_add(struct sk_buff *skb, struct genl_info *info) | |||
421 | break; | 422 | break; |
422 | } | 423 | } |
423 | if (ret_val == 0) | 424 | if (ret_val == 0) |
424 | netlbl_mgmt_protocount_inc(); | 425 | atomic_inc(&netlabel_mgmt_protocount); |
425 | 426 | ||
426 | audit_buf = netlbl_audit_start_common(AUDIT_MAC_CIPSOV4_ADD, | 427 | audit_buf = netlbl_audit_start_common(AUDIT_MAC_CIPSOV4_ADD, |
427 | &audit_info); | 428 | &audit_info); |
@@ -698,7 +699,7 @@ static int netlbl_cipsov4_remove(struct sk_buff *skb, struct genl_info *info) | |||
698 | &audit_info, | 699 | &audit_info, |
699 | netlbl_cipsov4_doi_free); | 700 | netlbl_cipsov4_doi_free); |
700 | if (ret_val == 0) | 701 | if (ret_val == 0) |
701 | netlbl_mgmt_protocount_dec(); | 702 | atomic_dec(&netlabel_mgmt_protocount); |
702 | 703 | ||
703 | audit_buf = netlbl_audit_start_common(AUDIT_MAC_CIPSOV4_DEL, | 704 | audit_buf = netlbl_audit_start_common(AUDIT_MAC_CIPSOV4_DEL, |
704 | &audit_info); | 705 | &audit_info); |