nfsd: clean up nfsd_create_serv error handling
authorJeff Layton <jlayton@redhat.com>
Wed, 21 Jul 2010 20:40:08 +0000 (16:40 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Fri, 23 Jul 2010 12:51:25 +0000 (08:51 -0400)
There doesn't seem to be any need to reset the nfssvc_boot time if the
nfsd startup failed.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfssvc.c

index d7a4d7b..a631ea6 100644 (file)
@@ -292,10 +292,9 @@ int nfsd_create_serv(void)
        nfsd_serv = svc_create_pooled(&nfsd_program, nfsd_max_blksize,
                                      nfsd_last_thread, nfsd, THIS_MODULE);
        if (nfsd_serv == NULL)
-               err = -ENOMEM;
-       else
-               set_max_drc();
+               return -ENOMEM;
 
+       set_max_drc();
        do_gettimeofday(&nfssvc_boot);          /* record boot time */
        return err;
 }