Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0655960f76922a720ad14a510ed91a51395e742b
Commit:     0655960f76922a720ad14a510ed91a51395e742b
Parent:     29eb981a3b8eb4e61cd5b9da835768045d0446cb
Author:     Chuck Lever <[EMAIL PROTECTED]>
AuthorDate: Sun Jul 1 12:12:35 2007 -0400
Committer:  Trond Myklebust <[EMAIL PROTECTED]>
CommitDate: Tue Jul 10 23:40:44 2007 -0400

    NFS: Clean up error handling in nfs_get_sb
    
    The error return logic in nfs_get_sb now matches nfs4_get_sb, and is more 
maintainable.
    A subsequent patch will take advantage of this simplification.
    
    Signed-off-by: Chuck Lever <[EMAIL PROTECTED]>
    Signed-off-by: Trond Myklebust <[EMAIL PROTECTED]>
---
 fs/nfs/super.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 04ad881..aab5cd6 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -633,13 +633,13 @@ static int nfs_get_sb(struct file_system_type *fs_type,
        /* Validate the mount data */
        error = nfs_validate_mount_data(data, &mntfh);
        if (error < 0)
-               return error;
+               goto out;
 
        /* Get a volume representation */
        server = nfs_create_server(data, &mntfh);
        if (IS_ERR(server)) {
                error = PTR_ERR(server);
-               goto out_err_noserver;
+               goto out;
        }
 
        /* Get a superblock - note that we may end up sharing one that already 
exists */
@@ -669,17 +669,19 @@ static int nfs_get_sb(struct file_system_type *fs_type,
        s->s_flags |= MS_ACTIVE;
        mnt->mnt_sb = s;
        mnt->mnt_root = mntroot;
-       return 0;
+       error = 0;
+
+out:
+       return error;
 
 out_err_nosb:
        nfs_free_server(server);
-out_err_noserver:
-       return error;
+       goto out;
 
 error_splat_super:
        up_write(&s->s_umount);
        deactivate_super(s);
-       return error;
+       goto out;
 }
 
 /*
-
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