Skip to content

Commit

Permalink
nfsd: minor nfsd_svc() cleanup
Browse files Browse the repository at this point in the history
More idiomatic to put the error case in the if clause.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
  • Loading branch information
J. Bruce Fields committed Jul 23, 2010
1 parent 59db4a0 commit af4718f
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions fs/nfsd/nfssvc.c
Original file line number Diff line number Diff line change
Expand Up @@ -443,12 +443,13 @@ nfsd_svc(unsigned short port, int nrservs)
if (error)
goto out_shutdown;
error = svc_set_num_threads(nfsd_serv, NULL, nrservs);
if (error == 0)
/* We are holding a reference to nfsd_serv which
* we don't want to count in the return value,
* so subtract 1
*/
error = nfsd_serv->sv_nrthreads - 1;
if (error)
goto out_destroy;
/* We are holding a reference to nfsd_serv which
* we don't want to count in the return value,
* so subtract 1
*/
error = nfsd_serv->sv_nrthreads - 1;
out_destroy:
svc_destroy(nfsd_serv); /* Release server */
out_shutdown:
Expand Down

0 comments on commit af4718f

Please sign in to comment.