[PATCH] [afs] Add lock annotations toafs_proc_cell_servers_{start,stop}

From: Josh Triplett
Date: Mon Jul 24 2006 - 20:28:27 EST


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@xxxxxxxxxxxxxxx>
---
fs/afs/proc.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/fs/afs/proc.c b/fs/afs/proc.c
index 101d21b..86463ec 100644
--- a/fs/afs/proc.c
+++ b/fs/afs/proc.c
@@ -775,6 +775,7 @@ static int afs_proc_cell_servers_release
* 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(
* 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;



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/