From patchwork Thu Jun 26 19:21:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 4431231 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B2E4FBEECB for ; Thu, 26 Jun 2014 19:22:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EC31120154 for ; Thu, 26 Jun 2014 19:22:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2BC36201BA for ; Thu, 26 Jun 2014 19:22:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751904AbaFZTV7 (ORCPT ); Thu, 26 Jun 2014 15:21:59 -0400 Received: from mail-qg0-f45.google.com ([209.85.192.45]:42026 "EHLO mail-qg0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751892AbaFZTV6 (ORCPT ); Thu, 26 Jun 2014 15:21:58 -0400 Received: by mail-qg0-f45.google.com with SMTP id 63so3440137qgz.18 for ; Thu, 26 Jun 2014 12:21:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=NcahFaQiNXbmA4yJVTARqciaya7PWw0Olx+5OFJ9Ox8=; b=J6d34JGIA/A5+6LQ+HaewRraWZQng3aBAoaQKGYySsew4f0DltpZGGXDFTPbxCvlCD fwHshRRto0Bax3jpcAMVpOV4JFxp1nMm6lFBopUMVVpCAIG44iV/YGY/+KzI7Ey6wK7F uqdvfRpz94O6wF4MmOodMxP/xZ5dOO01hEOr69hz4IAHc8C3bEWrRBtF1bDoUW8WEnxJ cYdQmAHzs3Dk1BsU+Tj3FBz+c/HzX5pl122LrzvdrDgvTBIP6t6xsPP4MFCyqvD6FvTR Ib7ATgAMxwJDTFC6VXU5HHt/OkbZbGDhQa9SR17Z3AHahpa+evvyrFtKixBR2CLrTeOu hwoQ== X-Gm-Message-State: ALoCoQnI/OMZ4OTciW2vmrxC0RIz5nVw5XEFJ+Hi0vo//TWX8x2MxNNym1aI/X+Sb/H3zYAlW/Ez X-Received: by 10.224.87.130 with SMTP id w2mr25661528qal.5.1403810517994; Thu, 26 Jun 2014 12:21:57 -0700 (PDT) Received: from tlielax.poochiereds.net ([2001:470:8:d63:3a60:77ff:fe93:a95d]) by mx.google.com with ESMTPSA id k76sm4765555qgd.38.2014.06.26.12.21.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Jun 2014 12:21:57 -0700 (PDT) From: Jeff Layton To: bfields@fieldses.org Cc: linux-nfs@vger.kernel.org, Trond Myklebust Subject: [PATCH v2 104/117] nfsd: Remove nfs4_lock_state(): nfs4_preprocess_stateid_op() Date: Thu, 26 Jun 2014 15:21:12 -0400 Message-Id: <1403810485-16497-21-git-send-email-jlayton@primarydata.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1403810017-16062-1-git-send-email-jlayton@primarydata.com> References: <1403810017-16062-1-git-send-email-jlayton@primarydata.com> Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Trond Myklebust Signed-off-by: Trond Myklebust --- fs/nfsd/nfs4state.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 16269a54b689..658863ed1c35 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -4423,13 +4423,11 @@ nfs4_preprocess_stateid_op(struct net *net, struct nfsd4_compound_state *cstate, if (ZERO_STATEID(stateid) || ONE_STATEID(stateid)) return check_special_stateids(net, current_fh, stateid, flags); - nfs4_lock_state(); - status = nfsd4_lookup_stateid(cstate, stateid, NFS4_DELEG_STID|NFS4_OPEN_STID|NFS4_LOCK_STID, &s, nn); if (status) - goto unlock_state; + return status; status = check_stateid_generation(stateid, &s->sc_stateid, nfsd4_has_session(cstate)); if (status) goto out; @@ -4479,8 +4477,6 @@ nfs4_preprocess_stateid_op(struct net *net, struct nfsd4_compound_state *cstate, *filpp = file; out: nfs4_put_stid(s); -unlock_state: - nfs4_unlock_state(); return status; }