summaryrefslogtreecommitdiffstats
path: root/security/keys
diff options
context:
space:
mode:
authorJames Morris <jmorris@namei.org>2009-06-18 22:00:05 +1000
committerJames Morris <jmorris@namei.org>2009-06-25 00:09:12 +1000
commit86abcf9cebf7b5ceb33facde297face5ec4d2260 (patch)
tree1b71608a4c025882f82a952d56d0f546d461736b /security/keys
parent20dda18be9035c487c2e9534e4d18d2a1e1deade (diff)
downloadlinux-86abcf9cebf7b5ceb33facde297face5ec4d2260.tar.bz2
keys: annotate seqfile ops with __releases and __acquires
Annotate seqfile ops with __releases and __acquires to stop sparse complaining about unbalanced locking. Signed-off-by: James Morris <jmorris@namei.org> Reviewed-by: Serge Hallyn <serue@us.ibm.com>
Diffstat (limited to 'security/keys')
-rw-r--r--security/keys/proc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/security/keys/proc.c b/security/keys/proc.c
index 769f9bdfd2b3..39793c774f33 100644
--- a/security/keys/proc.c
+++ b/security/keys/proc.c
@@ -120,6 +120,7 @@ static int proc_keys_open(struct inode *inode, struct file *file)
}
static void *proc_keys_start(struct seq_file *p, loff_t *_pos)
+ __acquires(key_serial_lock)
{
struct rb_node *_p;
loff_t pos = *_pos;
@@ -144,6 +145,7 @@ static void *proc_keys_next(struct seq_file *p, void *v, loff_t *_pos)
}
static void proc_keys_stop(struct seq_file *p, void *v)
+ __releases(key_serial_lock)
{
spin_unlock(&key_serial_lock);
}
@@ -257,6 +259,7 @@ static int proc_key_users_open(struct inode *inode, struct file *file)
}
static void *proc_key_users_start(struct seq_file *p, loff_t *_pos)
+ __acquires(key_user_lock)
{
struct rb_node *_p;
loff_t pos = *_pos;
@@ -281,6 +284,7 @@ static void *proc_key_users_next(struct seq_file *p, void *v, loff_t *_pos)
}
static void proc_key_users_stop(struct seq_file *p, void *v)
+ __releases(key_user_lock)
{
spin_unlock(&key_user_lock);
}