nfsd: optimise the starting of zero threads when none are running.
authorNeilBrown <neilb@suse.de>
Tue, 16 Jun 2009 01:03:20 +0000 (11:03 +1000)
committerJ. Bruce Fields <bfields@citi.umich.edu>
Thu, 18 Jun 2009 16:42:41 +0000 (09:42 -0700)
commit671e1fcf63fd115eabcb693b06cbc2e4a3d1a3a3
tree601c7896733bf026db66ebbb183c3675e89e37d7
parent82e12fe9244ff653f703722a8937b595e10e71f4
nfsd: optimise the starting of zero threads when none are running.

Currently, if we ask to set then number of nfsd threads to zero when
there are none running, we set up all the sockets and register the
service, and then tear it all down again.
This is pointless.

So detect that case and exit promptly.
(also remove an assignment to 'error' which was never used.

Signed-off-by: NeilBrown <neilb@suse.de>
Acked-by: Jeff Layton <jlayton@redhat.com>
fs/nfsd/nfssvc.c