aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/lockd/svc.c6
-rw-r--r--fs/nfs/callback.c6
-rw-r--r--include/linux/sunrpc/svc.h3
3 files changed, 6 insertions, 9 deletions
diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c
index b220e1b91726..2f50d5b2a8a4 100644
--- a/fs/lockd/svc.c
+++ b/fs/lockd/svc.c
@@ -430,14 +430,12 @@ static struct svc_serv *lockd_create_svc(void)
/*
* Check whether we're already up and running.
*/
- if (nlmsvc_rqst) {
+ if (nlmsvc_rqst)
/*
* Note: increase service usage, because later in case of error
* svc_destroy() will be called.
*/
- svc_get(nlmsvc_rqst->rq_server);
- return nlmsvc_rqst->rq_server;
- }
+ return svc_get(nlmsvc_rqst->rq_server);
/*
* Sanity check: if there's no pid,
diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c
index 86d856de1389..6e5e742a42b8 100644
--- a/fs/nfs/callback.c
+++ b/fs/nfs/callback.c
@@ -266,14 +266,12 @@ static struct svc_serv *nfs_callback_create_svc(int minorversion)
/*
* Check whether we're already up and running.
*/
- if (cb_info->serv) {
+ if (cb_info->serv)
/*
* Note: increase service usage, because later in case of error
* svc_destroy() will be called.
*/
- svc_get(cb_info->serv);
- return cb_info->serv;
- }
+ return svc_get(cb_info->serv);
switch (minorversion) {
case 0:
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
index 0ae28ae6caf2..5d9568953fcd 100644
--- a/include/linux/sunrpc/svc.h
+++ b/include/linux/sunrpc/svc.h
@@ -120,9 +120,10 @@ struct svc_serv {
* change the number of threads. Horrible, but there it is.
* Should be called with the "service mutex" held.
*/
-static inline void svc_get(struct svc_serv *serv)
+static inline struct svc_serv *svc_get(struct svc_serv *serv)
{
serv->sv_nrthreads++;
+ return serv;
}
/*