Commit af4718f3 authored by J. Bruce Fields's avatar J. Bruce Fields

nfsd: minor nfsd_svc() cleanup

More idiomatic to put the error case in the if clause.
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent 59db4a0c
...@@ -443,12 +443,13 @@ nfsd_svc(unsigned short port, int nrservs) ...@@ -443,12 +443,13 @@ nfsd_svc(unsigned short port, int nrservs)
if (error) if (error)
goto out_shutdown; goto out_shutdown;
error = svc_set_num_threads(nfsd_serv, NULL, nrservs); error = svc_set_num_threads(nfsd_serv, NULL, nrservs);
if (error == 0) if (error)
/* We are holding a reference to nfsd_serv which goto out_destroy;
* we don't want to count in the return value, /* We are holding a reference to nfsd_serv which
* so subtract 1 * we don't want to count in the return value,
*/ * so subtract 1
error = nfsd_serv->sv_nrthreads - 1; */
error = nfsd_serv->sv_nrthreads - 1;
out_destroy: out_destroy:
svc_destroy(nfsd_serv); /* Release server */ svc_destroy(nfsd_serv); /* Release server */
out_shutdown: out_shutdown:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment