From patchwork Wed Jul 30 12:27:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 4648201 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 C7657C033A for ; Wed, 30 Jul 2014 12:28:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E92C420121 for ; Wed, 30 Jul 2014 12:28:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1C5BF20158 for ; Wed, 30 Jul 2014 12:28:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753793AbaG3M2b (ORCPT ); Wed, 30 Jul 2014 08:28:31 -0400 Received: from mail-qg0-f52.google.com ([209.85.192.52]:36098 "EHLO mail-qg0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753118AbaG3M23 (ORCPT ); Wed, 30 Jul 2014 08:28:29 -0400 Received: by mail-qg0-f52.google.com with SMTP id f51so1269577qge.39 for ; Wed, 30 Jul 2014 05:28:28 -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=+Aee9UZyE+wwT0udVLvT2JVs3da96u0EemsBxSb0LmU=; b=aH2WP1kBpcJ8blWQkCsU936rjYcnoNFhl346xCAoAnKSnuycSmIeVf/VoLu+ifpNq3 krCdpNdySCYAMfeBZtEvNuiOuudjO1h7ZVIS7XMPkntghcLDN2Sk1n6KnxbSfesYCHeu rsmuvVJR682GjRTu/8IiKmaWAe7xEb8Vi3+f0fBPZfYvjktw+L0zXWpRTpigQwItQhUb Rs3jbTH6pNWLvzSeBb9AWIe+nyLljffMcXwGbr8zyZq1NFetgNgIQp+qntvdraHtWnpl NQbXJlMsPGI+DI7S7DnLqJulhGTMsMv5zj2B3wd6/SYSz5W+hRZt0lzy13Cq8fhDTtCv BtQw== X-Gm-Message-State: ALoCoQll0DcxbgNw6m3Dbx38HgUXfBh4riMKGwVXDnAs9xAIigucvfb60bu+zn8Daa6r5DeRnCWr X-Received: by 10.224.137.193 with SMTP id x1mr6671258qat.0.1406723308406; Wed, 30 Jul 2014 05:28:28 -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.27 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Jul 2014 05:28:27 -0700 (PDT) From: Jeff Layton To: bfields@fieldses.org Cc: linux-nfs@vger.kernel.org, hch@infradead.org, Trond Myklebust Subject: [PATCH 31/37] nfsd: Remove nfs4_lock_state(): exchange_id, create/destroy_session() Date: Wed, 30 Jul 2014 08:27:32 -0400 Message-Id: <1406723258-8512-32-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 Also destroy_clientid and bind_conn_to_session. Signed-off-by: Trond Myklebust --- fs/nfsd/nfs4state.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 02caef874d67..3b7fceed0a0a 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -2205,7 +2205,6 @@ nfsd4_exchange_id(struct svc_rqst *rqstp, return nfserr_jukebox; /* Cases below refer to rfc 5661 section 18.35.4: */ - nfs4_lock_state(); spin_lock(&nn->client_lock); conf = find_confirmed_client_by_name(&exid->clname, nn); if (conf) { @@ -2284,7 +2283,6 @@ out_copy: out: spin_unlock(&nn->client_lock); - nfs4_unlock_state(); if (new) expire_client(new); if (unconf) @@ -2458,7 +2456,6 @@ nfsd4_create_session(struct svc_rqst *rqstp, if (!conn) goto out_free_session; - nfs4_lock_state(); spin_lock(&nn->client_lock); unconf = find_unconfirmed_client(&cr_ses->clientid, true, nn); conf = find_confirmed_client(&cr_ses->clientid, true, nn); @@ -2528,13 +2525,11 @@ nfsd4_create_session(struct svc_rqst *rqstp, /* init connection and backchannel */ nfsd4_init_conn(rqstp, conn, new); nfsd4_put_session(new); - nfs4_unlock_state(); if (old) expire_client(old); return status; out_free_conn: spin_unlock(&nn->client_lock); - nfs4_unlock_state(); free_conn(conn); if (old) expire_client(old); @@ -2590,7 +2585,6 @@ __be32 nfsd4_bind_conn_to_session(struct svc_rqst *rqstp, if (!nfsd4_last_compound_op(rqstp)) return nfserr_not_only_op; - nfs4_lock_state(); spin_lock(&nn->client_lock); session = find_in_sessionid_hashtbl(&bcts->sessionid, net, &status); spin_unlock(&nn->client_lock); @@ -2611,7 +2605,6 @@ __be32 nfsd4_bind_conn_to_session(struct svc_rqst *rqstp, out: nfsd4_put_session(session); out_no_session: - nfs4_unlock_state(); return status; } @@ -2633,7 +2626,6 @@ nfsd4_destroy_session(struct svc_rqst *r, struct net *net = SVC_NET(r); struct nfsd_net *nn = net_generic(net, nfsd_net_id); - nfs4_lock_state(); status = nfserr_not_only_op; if (nfsd4_compound_in_session(cstate->session, &sessionid->sessionid)) { if (!nfsd4_last_compound_op(r)) @@ -2663,7 +2655,6 @@ out_put_session: out_client_lock: spin_unlock(&nn->client_lock); out: - nfs4_unlock_state(); return status; } @@ -2866,7 +2857,6 @@ nfsd4_destroy_clientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *csta __be32 status = 0; struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id); - nfs4_lock_state(); spin_lock(&nn->client_lock); unconf = find_unconfirmed_client(&dc->clientid, true, nn); conf = find_confirmed_client(&dc->clientid, true, nn); @@ -2895,7 +2885,6 @@ nfsd4_destroy_clientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *csta unhash_client_locked(clp); out: spin_unlock(&nn->client_lock); - nfs4_unlock_state(); if (clp) expire_client(clp); return status;