mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] [nfsd] Add lock annotations to e_start and e_stop
@ 2006-07-25 15:20 Josh Triplett
  2006-07-26  8:06 ` [NFS] " Christoph Hellwig
  0 siblings, 1 reply; 4+ messages in thread
From: Josh Triplett @ 2006-07-25 15:20 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andrew Morton, Neil Brown, nfs

e_start acquires svc_export_cache.hash_lock, and e_stop releases it.  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>
---
 fs/nfsd/export.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c
index 01bc68c..6fe54eb 100644
--- a/fs/nfsd/export.c
+++ b/fs/nfsd/export.c
@@ -1078,6 +1078,7 @@ exp_pseudoroot(struct auth_domain *clp, 
 /* Iterator */
 
 static void *e_start(struct seq_file *m, loff_t *pos)
+	__acquires(svc_export_cache.hash_lock)
 {
 	loff_t n = *pos;
 	unsigned hash, export;
@@ -1131,6 +1132,7 @@ static void *e_next(struct seq_file *m, 
 }
 
 static void e_stop(struct seq_file *m, void *p)
+	__releases(svc_export_cache.hash_lock)
 {
 	read_unlock(&svc_export_cache.hash_lock);
 	exp_readunlock();



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-07-26 15:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-25 15:20 [PATCH] [nfsd] Add lock annotations to e_start and e_stop Josh Triplett
2006-07-26  8:06 ` [NFS] " Christoph Hellwig
2006-07-26  8:19   ` Arjan van de Ven
2006-07-26 15:42     ` Josh Triplett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®