diff options
author | Greg Banks <gnb@melbourne.sgi.com> | 2006-10-02 02:17:58 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-02 07:57:19 -0700 |
commit | 9a24ab5749a31aa10ee60d9310ad72f24d7c38ab (patch) | |
tree | bae1805492889c3d59017571c062ce4a02e024aa /include/linux | |
parent | 3262c816a3d7fb1eaabce633caa317887ed549ae (diff) | |
download | linux-3.10-9a24ab5749a31aa10ee60d9310ad72f24d7c38ab.tar.gz linux-3.10-9a24ab5749a31aa10ee60d9310ad72f24d7c38ab.tar.bz2 linux-3.10-9a24ab5749a31aa10ee60d9310ad72f24d7c38ab.zip |
[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/linux')
-rw-r--r-- | include/linux/sunrpc/svc.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index c27d806af31..54d8e7bc234 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h @@ -71,6 +71,17 @@ struct svc_serv { }; /* + * We use sv_nrthreads as a reference count. svc_destroy() drops + * this refcount, so we need to bump it up around operations that + * change the number of threads. Horrible, but there it is. + * Should be called with the BKL held. + */ +static inline void svc_get(struct svc_serv *serv) +{ + serv->sv_nrthreads++; +} + +/* * Maximum payload size supported by a kernel RPC server. * This is use to determine the max number of pages nfsd is * willing to return in a single READ operation. |