[PATCH] nfsd4: fix setclientid unlock of unlocked state lock
authorNeil Brown <neilb@suse.de>
Tue, 13 Sep 2005 08:25:39 +0000 (01:25 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 13 Sep 2005 15:22:32 +0000 (08:22 -0700)
We could try to unlock the state lock here without having first locked it.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/nfsd/nfs4state.c

index ec2fdb009bf1af85e1dd757b80b506c0274c6d06..6bbefd06f10dea127ee0bf406eb1ef01fcfd4247 100644 (file)
@@ -678,13 +678,12 @@ nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_setclientid *setclid)
        int                     status;
        char                    dname[HEXDIR_LEN];
        
-       status = nfserr_inval;
        if (!check_name(clname))
-               goto out;
+               return nfserr_inval;
 
        status = nfs4_make_rec_clidname(dname, &clname);
        if (status)
-               goto out;
+               return status;
 
        /* 
         * XXX The Duplicate Request Cache (DRC) has been checked (??)