From patchwork Wed Jul 30 12:27:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 4648131 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D21829F36A for ; Wed, 30 Jul 2014 12:28:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1B5E6200E9 for ; Wed, 30 Jul 2014 12:28:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 453BF20121 for ; Wed, 30 Jul 2014 12:28:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754720AbaG3M2W (ORCPT ); Wed, 30 Jul 2014 08:28:22 -0400 Received: from mail-qg0-f44.google.com ([209.85.192.44]:32775 "EHLO mail-qg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753225AbaG3M2T (ORCPT ); Wed, 30 Jul 2014 08:28:19 -0400 Received: by mail-qg0-f44.google.com with SMTP id e89so1304120qgf.17 for ; Wed, 30 Jul 2014 05:28:18 -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=vi2K/b4Pn/pt7+zM3TTQOdvotaO+qGM1Xj5lvdmqch0=; b=fonsULbz5lO2TzNtmrVPUO6P+fhLQGn1m6wZOBGtpussPhYi4POBBWs+/G7+tx+s8x lzpHoHoQwqUvyR6ZxmmKpLj064yKHsmlTs6ktT5jchx/6Agpl95B46NtAUdCEmHG3sgk LUD56OQbWEVicz2ydbicfiF88n0N7+h8RMXbyO+1/FbMfAuwsjDXFubYqfNlW7vRGhzy REbDmHzaIvGR1M7v7E9oz6b3h0xxGsi3wa8xDHILXqzG9SXwndadhACIv1Afsk1CEKpl kgAhx0X4B5I4NUFHMT++LbiPUNpErnqunnMMCMkGOcUYhjTt1Usg7yMzHFcm9+5Y9rNl 4HzA== X-Gm-Message-State: ALoCoQlOUqhg4V0klnWwb+0XKvI/JU2UCxVOVoZaCvteqUZYrTefDBAufE/HFssPGL1BVzVpJPRW X-Received: by 10.140.94.197 with SMTP id g63mr5966852qge.90.1406723298674; Wed, 30 Jul 2014 05:28:18 -0700 (PDT) Received: from tlielax.poochiereds.net ([2001:470:8:d63:3a60:77ff:fe93:a95d]) by mx.google.com with ESMTPSA id t23sm2384767qge.13.2014.07.30.05.28.17 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Jul 2014 05:28:17 -0700 (PDT) From: Jeff Layton To: bfields@fieldses.org Cc: linux-nfs@vger.kernel.org, hch@infradead.org, Trond Myklebust Subject: [PATCH 24/37] nfsd: Remove nfs4_lock_state(): nfs4_preprocess_stateid_op() Date: Wed, 30 Jul 2014 08:27:25 -0400 Message-Id: <1406723258-8512-25-git-send-email-jlayton@primarydata.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1406723258-8512-1-git-send-email-jlayton@primarydata.com> References: <1406723258-8512-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=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 baf83cf96b26..9013a30874e3 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -4461,13 +4461,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; @@ -4517,8 +4515,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; }