Some error paths in nfsd_unlink() allow it to exit without unlocking the
directory.  This is not a problem in practice as the directory will be
locked with an fh_put(), but it is untidy and potentially confusing.
This allows us to remove all the fh_unlock() calls that are immediately
after nfsd_unlink() calls.
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
        fh_copy(&resp->fh, &argp->fh);
        resp->status = nfsd_unlink(rqstp, &resp->fh, -S_IFDIR,
                                   argp->name, argp->len);
-       fh_unlock(&resp->fh);
        return rpc_success;
 }
 
        fh_copy(&resp->fh, &argp->fh);
        resp->status = nfsd_unlink(rqstp, &resp->fh, S_IFDIR,
                                   argp->name, argp->len);
-       fh_unlock(&resp->fh);
        return rpc_success;
 }
 
 
                return nfserr_grace;
        status = nfsd_unlink(rqstp, &cstate->current_fh, 0,
                             remove->rm_name, remove->rm_namelen);
-       if (!status) {
-               fh_unlock(&cstate->current_fh);
+       if (!status)
                set_change_info(&remove->rm_cinfo, &cstate->current_fh);
-       }
        return status;
 }
 
 
        rdentry = lookup_one_len(fname, dentry, flen);
        host_err = PTR_ERR(rdentry);
        if (IS_ERR(rdentry))
-               goto out_drop_write;
+               goto out_unlock;
 
        if (d_really_is_negative(rdentry)) {
                dput(rdentry);
                host_err = -ENOENT;
-               goto out_drop_write;
+               goto out_unlock;
        }
        rinode = d_inode(rdentry);
        ihold(rinode);
        }
 out:
        return err;
+out_unlock:
+       fh_unlock(fhp);
+       goto out_drop_write;
 }
 
 /*