aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
authorJosh Triplett <josht@us.ibm.com>2006-10-02 05:17:50 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-02 10:57:18 -0400
commit896440d560de3bca6813e83792f431edf5073318 (patch)
tree38f140167006e40c969d89797af2719ce3e387ad /fs/nfsd
parentbc6f02e516b487ada46823fb05f237a0ef705f92 (diff)
[PATCH] nfsd: add lock annotations to e_start and e_stop
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> Cc: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/export.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c
index eccd2c2eb60..cfe141e5d75 100644
--- a/fs/nfsd/export.c
+++ b/fs/nfsd/export.c
@@ -1078,6 +1078,7 @@ exp_pseudoroot(struct auth_domain *clp, struct svc_fh *fhp,
1078/* Iterator */ 1078/* Iterator */
1079 1079
1080static void *e_start(struct seq_file *m, loff_t *pos) 1080static void *e_start(struct seq_file *m, loff_t *pos)
1081 __acquires(svc_export_cache.hash_lock)
1081{ 1082{
1082 loff_t n = *pos; 1083 loff_t n = *pos;
1083 unsigned hash, export; 1084 unsigned hash, export;
@@ -1131,6 +1132,7 @@ static void *e_next(struct seq_file *m, void *p, loff_t *pos)
1131} 1132}
1132 1133
1133static void e_stop(struct seq_file *m, void *p) 1134static void e_stop(struct seq_file *m, void *p)
1135 __releases(svc_export_cache.hash_lock)
1134{ 1136{
1135 read_unlock(&svc_export_cache.hash_lock); 1137 read_unlock(&svc_export_cache.hash_lock);
1136 exp_readunlock(); 1138 exp_readunlock();