Currently, it's left up in some situations. That could cause the grace period to be shorter than it should be (along with other problems). Signed-off-by: Jeff Layton <jlayton@xxxxxxxxxx> --- fs/nfsd/nfssvc.c | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c index 06b2a26..a06ea99 100644 --- a/fs/nfsd/nfssvc.c +++ b/fs/nfsd/nfssvc.c @@ -402,9 +402,9 @@ nfsd_svc(unsigned short port, int nrservs) nfsd_reset_versions(); error = nfsd_create_serv(); - if (error) - goto out; + goto shutdown_state; + error = nfsd_init_socks(port); if (error) goto failure; @@ -416,9 +416,12 @@ nfsd_svc(unsigned short port, int nrservs) * so subtract 1 */ error = nfsd_serv->sv_nrthreads - 1; - failure: +failure: svc_destroy(nfsd_serv); /* Release server */ - out: +shutdown_state: + if (error < 0) + nfs4_state_shutdown(); +out: mutex_unlock(&nfsd_mutex); return error; } -- 1.5.5.6 -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html