Skip to content

Commit

Permalink
keys: annotate seqfile ops with __releases and __acquires
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
James Morris committed Jun 24, 2009
1 parent 20dda18 commit 86abcf9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions security/keys/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
}
Expand Down Expand Up @@ -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;
Expand All @@ -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);
}
Expand Down

0 comments on commit 86abcf9

Please sign in to comment.