From patchwork Wed Jul 30 12:27:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 4648161 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 6D1F2C033A for ; Wed, 30 Jul 2014 12:28:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9D427200E9 for ; Wed, 30 Jul 2014 12:28:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C636920138 for ; Wed, 30 Jul 2014 12:28:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753046AbaG3M21 (ORCPT ); Wed, 30 Jul 2014 08:28:27 -0400 Received: from mail-qg0-f42.google.com ([209.85.192.42]:51308 "EHLO mail-qg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753118AbaG3M2X (ORCPT ); Wed, 30 Jul 2014 08:28:23 -0400 Received: by mail-qg0-f42.google.com with SMTP id j5so1296322qga.29 for ; Wed, 30 Jul 2014 05:28:22 -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=N9u/oVms8xEk6ep3/exy4pAN/QCydsTCKvrsWDpzP60=; b=c19/yBcSksHyy5X7ec69xS2D9NVuj/qqk9T73Q3aj/zaPnfsoD7qA8DQeCbzme2nln wL01FWBySIFx5bHlXxyWVwbcL8Scfyl49y1Mj9OKtSNdbvp00n3HXeF5F5BaMDGW+8Lg Io1AwKZTa9QWbIuTUt+vhKvbHJ8IXkk2UVJZA341RLElvgm7rOmjhS/5K8+LlBz516Gz guriqb7xMSO4/UX+U6tgopfLBzOm9p/2Ruk8fwF/QVlwzB+mC/248iysjsfVyhb+/Xw+ X63HHbPwF84Sk1N/viV6eJ6z8DKij3/oHgbPjHCyQFN+gbo18JxM/YwJ/8OqxzC471Eh q2IQ== X-Gm-Message-State: ALoCoQnw+9xlzmUFCd0JCfNmj19AqTKMGCbIzo1d0Ad3HhGotFzKVS7H0c3sQh3rWVgJq1CbaInv X-Received: by 10.229.211.132 with SMTP id go4mr6481779qcb.0.1406723302893; Wed, 30 Jul 2014 05:28:22 -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.21 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Jul 2014 05:28:21 -0700 (PDT) From: Jeff Layton To: bfields@fieldses.org Cc: linux-nfs@vger.kernel.org, hch@infradead.org, Trond Myklebust Subject: [PATCH 27/37] nfsd: Remove nfs4_lock_state(): nfsd4_lock/locku/lockt() Date: Wed, 30 Jul 2014 08:27:28 -0400 Message-Id: <1406723258-8512-28-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 | 9 --------- 1 file changed, 9 deletions(-) diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 4f04a4a776cd..de3bb633d96b 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -5201,8 +5201,6 @@ nfsd4_lock(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, return status; } - nfs4_lock_state(); - if (lock->lk_is_new) { if (nfsd4_has_session(cstate)) /* See rfc 5661 18.10.3: given clientid is ignored: */ @@ -5345,7 +5343,6 @@ out: if (open_stp) nfs4_put_stid(&open_stp->st_stid); nfsd4_bump_seqid(cstate, status); - nfs4_unlock_state(); if (file_lock) locks_free_lock(file_lock); if (conflock) @@ -5388,8 +5385,6 @@ nfsd4_lockt(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, if (check_lock_length(lockt->lt_offset, lockt->lt_length)) return nfserr_inval; - nfs4_lock_state(); - if (!nfsd4_has_session(cstate)) { status = lookup_clientid(&lockt->lt_clientid, cstate, nn); if (status) @@ -5444,7 +5439,6 @@ nfsd4_lockt(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, out: if (lo) nfs4_put_stateowner(&lo->lo_owner); - nfs4_unlock_state(); if (file_lock) locks_free_lock(file_lock); return status; @@ -5468,8 +5462,6 @@ nfsd4_locku(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, if (check_lock_length(locku->lu_offset, locku->lu_length)) return nfserr_inval; - nfs4_lock_state(); - status = nfs4_preprocess_seqid_op(cstate, locku->lu_seqid, &locku->lu_stateid, NFS4_LOCK_STID, &stp, nn); @@ -5512,7 +5504,6 @@ put_stateid: nfs4_put_stid(&stp->st_stid); out: nfsd4_bump_seqid(cstate, status); - nfs4_unlock_state(); if (file_lock) locks_free_lock(file_lock); return status;