Commit d530d5d3 authored by Chris Wright's avatar Chris Wright Committed by Linus Torvalds

[PATCH] selinux space saving

Move inline avc_cache_stats helper functions alongside the statically declared
avc_cache_stats array.
Signed-off-by: default avatarChris Wright <chrisw@osdl.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 0e14bcc4
...@@ -71,10 +71,10 @@ struct avc_callback_node { ...@@ -71,10 +71,10 @@ struct avc_callback_node {
}; };
static spinlock_t avc_lock = SPIN_LOCK_UNLOCKED; static spinlock_t avc_lock = SPIN_LOCK_UNLOCKED;
static struct avc_node *avc_node_freelist = NULL; static struct avc_node *avc_node_freelist;
static struct avc_cache avc_cache; static struct avc_cache avc_cache;
static unsigned avc_cache_stats[AVC_NSTATS]; static unsigned avc_cache_stats[AVC_NSTATS];
static struct avc_callback_node *avc_callbacks = NULL; static struct avc_callback_node *avc_callbacks;
static inline int avc_hash(u32 ssid, u32 tsid, u16 tclass) static inline int avc_hash(u32 ssid, u32 tsid, u16 tclass)
{ {
...@@ -191,15 +191,6 @@ void __init avc_init(void) ...@@ -191,15 +191,6 @@ void __init avc_init(void)
struct avc_node *new; struct avc_node *new;
int i; int i;
for (i = 0; i < AVC_NSTATS; i++)
avc_cache_stats[i] = 0;
for (i = 0; i < AVC_CACHE_SLOTS; i++)
avc_cache.slots[i] = 0;
avc_cache.lru_hint = 0;
avc_cache.active_nodes = 0;
avc_cache.latest_notif = 0;
for (i = 0; i < AVC_CACHE_MAXNODES; i++) { for (i = 0; i < AVC_CACHE_MAXNODES; i++) {
new = kmalloc(sizeof(*new), GFP_ATOMIC); new = kmalloc(sizeof(*new), GFP_ATOMIC);
if (!new) { if (!new) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment