aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGreg Banks <gnb@melbourne.sgi.com>2006-10-02 05:17:58 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-02 10:57:19 -0400
commit9a24ab5749a31aa10ee60d9310ad72f24d7c38ab (patch)
treebae1805492889c3d59017571c062ce4a02e024aa /include
parent3262c816a3d7fb1eaabce633caa317887ed549ae (diff)
[PATCH] knfsd: add svc_get
add svc_get() for those occasions when we need to temporarily bump up svc_serv->sv_nrthreads as a pseudo refcount. Signed-off-by: Greg Banks <gnb@melbourne.sgi.com> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/sunrpc/svc.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
index c27d806af310..54d8e7bc2341 100644
--- a/include/linux/sunrpc/svc.h
+++ b/include/linux/sunrpc/svc.h
@@ -71,6 +71,17 @@ struct svc_serv {
71}; 71};
72 72
73/* 73/*
74 * We use sv_nrthreads as a reference count. svc_destroy() drops
75 * this refcount, so we need to bump it up around operations that
76 * change the number of threads. Horrible, but there it is.
77 * Should be called with the BKL held.
78 */
79static inline void svc_get(struct svc_serv *serv)
80{
81 serv->sv_nrthreads++;
82}
83
84/*
74 * Maximum payload size supported by a kernel RPC server. 85 * Maximum payload size supported by a kernel RPC server.
75 * This is use to determine the max number of pages nfsd is 86 * This is use to determine the max number of pages nfsd is
76 * willing to return in a single READ operation. 87 * willing to return in a single READ operation.