Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=26808d3f10b1213bbb6e27d441be40e20ab84611
Commit:     26808d3f10b1213bbb6e27d441be40e20ab84611
Parent:     46b25895767c606c630a97b03a895934a7a36a70
Author:     J. Bruce Fields <[EMAIL PROTECTED]>
AuthorDate: Fri Nov 9 13:44:06 2007 -0500
Committer:  J. Bruce Fields <[EMAIL PROTECTED]>
CommitDate: Fri Feb 1 16:42:03 2008 -0500

    nfsd: cleanup nfsd module initialization cleanup
    
    Handle the failure case here with something closer to the standard
    kernel style.
    
    Doesn't really matter for now, but I'd like to add a few more failure
    cases, and then this'll help.
    
    Acked-by: NeilBrown <[EMAIL PROTECTED]>
    Signed-off-by: J. Bruce Fields <[EMAIL PROTECTED]>
---
 fs/nfsd/nfsctl.c |   22 ++++++++++++----------
 1 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
index d8d50a7..ecf3779 100644
--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@ -694,16 +694,18 @@ static int __init init_nfsd(void)
                        entry->proc_fops =  &exports_operations;
        }
        retval = register_filesystem(&nfsd_fs_type);
-       if (retval) {
-               nfsd_idmap_shutdown();
-               nfsd_export_shutdown();
-               nfsd_cache_shutdown();
-               remove_proc_entry("fs/nfs/exports", NULL);
-               remove_proc_entry("fs/nfs", NULL);
-               nfsd_stat_shutdown();
-               nfsd_lockd_shutdown();
-               nfsd4_free_slabs();
-       }
+       if (retval)
+               goto out_free_all;
+       return 0;
+out_free_all:
+       nfsd_idmap_shutdown();
+       nfsd_export_shutdown();
+       nfsd_cache_shutdown();
+       remove_proc_entry("fs/nfs/exports", NULL);
+       remove_proc_entry("fs/nfs", NULL);
+       nfsd_stat_shutdown();
+       nfsd_lockd_shutdown();
+       nfsd4_free_slabs();
        return retval;
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to