|
@@ -390,12 +390,14 @@ nfsd_svc(unsigned short port, int nrservs)
|
|
|
|
|
|
mutex_lock(&nfsd_mutex);
|
|
mutex_lock(&nfsd_mutex);
|
|
dprintk("nfsd: creating service\n");
|
|
dprintk("nfsd: creating service\n");
|
|
- error = -EINVAL;
|
|
|
|
if (nrservs <= 0)
|
|
if (nrservs <= 0)
|
|
nrservs = 0;
|
|
nrservs = 0;
|
|
if (nrservs > NFSD_MAXSERVS)
|
|
if (nrservs > NFSD_MAXSERVS)
|
|
nrservs = NFSD_MAXSERVS;
|
|
nrservs = NFSD_MAXSERVS;
|
|
-
|
|
|
|
|
|
+ error = 0;
|
|
|
|
+ if (nrservs == 0 && nfsd_serv == NULL)
|
|
|
|
+ goto out;
|
|
|
|
+
|
|
/* Readahead param cache - will no-op if it already exists */
|
|
/* Readahead param cache - will no-op if it already exists */
|
|
error = nfsd_racache_init(2*nrservs);
|
|
error = nfsd_racache_init(2*nrservs);
|
|
if (error<0)
|
|
if (error<0)
|