summaryrefslogtreecommitdiffstats
path: root/fs/nfs/callback.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2021-11-29 05:51:25 +0100
committerChuck Lever <chuck.lever@oracle.com>2021-12-13 19:42:50 +0100
commitdf5e49c880ea0776806b8a9f8ab95e035272cf6f (patch)
tree57020650034662cd4daa43163b5e06403b801997 /fs/nfs/callback.c
parentNFSD: handle errors better in write_ports_addfd() (diff)
downloadlinux-df5e49c880ea0776806b8a9f8ab95e035272cf6f.tar.xz
linux-df5e49c880ea0776806b8a9f8ab95e035272cf6f.zip
SUNRPC: change svc_get() to return the svc.
It is common for 'get' functions to return the object that was 'got', and there are a couple of places where users of svc_get() would be a little simpler if svc_get() did that. Make it so. Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/nfs/callback.c')
-rw-r--r--fs/nfs/callback.c6
1 files changed, 2 insertions, 4 deletions
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: