]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] afs: add lock annotations to afs_proc_cell_servers_{start,stop}
authorJosh Triplett <josht@us.ibm.com>
Fri, 29 Sep 2006 08:59:25 +0000 (01:59 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 29 Sep 2006 16:18:07 +0000 (09:18 -0700)
afs_proc_cell_servers_start acquires a lock, and afs_proc_cell_servers_stop
releases that lock.  Add lock annotations to these two functions so that
sparse can check callers for lock pairing, and so that sparse will not
complain about these functions since they intentionally use locks in this
manner.

Signed-off-by: Josh Triplett <josh@freedesktop.org>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/afs/proc.c

index 101d21b6c03715b45ead510a2abccb706f23d209..86463ec9ccb496cea5907ec1de2075c982d4849d 100644 (file)
@@ -775,6 +775,7 @@ static int afs_proc_cell_servers_release(struct inode *inode,
  * first item
  */
 static void *afs_proc_cell_servers_start(struct seq_file *m, loff_t *_pos)
+       __acquires(m->private->sv_lock)
 {
        struct list_head *_p;
        struct afs_cell *cell = m->private;
@@ -823,6 +824,7 @@ static void *afs_proc_cell_servers_next(struct seq_file *p, void *v,
  * clean up after reading from the cells list
  */
 static void afs_proc_cell_servers_stop(struct seq_file *p, void *v)
+       __releases(p->private->sv_lock)
 {
        struct afs_cell *cell = p->private;