Skip to contentSkip to conversation

kernel/capability.c: make a spinlock static

PATCH In review Adrian Bunk 2 participants 2 messages Dec 12, 2004 – Dec 13, 2004 Capabilities

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel/capability.c: make a spinlock static

The patch below makes a needlessly global spinlock static.

diffstat output:

 include/linux/capability.h |    2 --
 kernel/capability.c        |    4 ++--
 2 files changed, 2 insertions(+), 4 deletions(-)
include/linux/capability.h renamed from include/linux/capability.h.old +0 -2
@@ -44,8 +44,6 @@
 
 #include <linux/spinlock.h>
 
-extern spinlock_t task_capability_lock;
-
 /* #define STRICT_CAP_T_TYPECHECKS */
 
 #ifdef STRICT_CAP_T_TYPECHECKS
kernel/capability.c renamed from kernel/capability.c.old +2 -2
@@ -20,10 +20,10 @@
 EXPORT_SYMBOL(cap_bset);
 
 /*
- * This global lock protects task->cap_* for all tasks including current.
+ * This lock protects task->cap_* for all tasks including current.
  * Locking rule: acquire this prior to tasklist_lock.
  */
-DEFINE_SPINLOCK(task_capability_lock);
+static DEFINE_SPINLOCK(task_capability_lock);
 
 /*
  * For sys_getproccap() and sys_setproccap(), any of the three