From patchwork Tue Dec 11 18:44:18 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trond Myklebust X-Patchwork-Id: 1863041 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id F1D6B3FCA5 for ; Tue, 11 Dec 2012 18:44:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754227Ab2LKSoa (ORCPT ); Tue, 11 Dec 2012 13:44:30 -0500 Received: from mx11.netapp.com ([216.240.18.76]:31223 "EHLO mx11.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753676Ab2LKSo3 (ORCPT ); Tue, 11 Dec 2012 13:44:29 -0500 X-IronPort-AV: E=Sophos;i="4.84,260,1355126400"; d="scan'208";a="328797315" Received: from smtp2.corp.netapp.com ([10.57.159.114]) by mx11-out.netapp.com with ESMTP; 11 Dec 2012 10:44:29 -0800 Received: from lade.trondhjem.org.com (lade.trondhjem.org.vpn.netapp.com [10.63.229.73]) by smtp2.corp.netapp.com (8.13.1/8.13.1/NTAP-1.6) with ESMTP id qBBIiMSR008946; Tue, 11 Dec 2012 10:44:28 -0800 (PST) From: Trond Myklebust To: bfields@fieldses.org Cc: linux-nfs@vger.kernel.org Subject: [PATCH v2 6/7] NFSD: Don't call nfsd4_sequence_adjust_slot_table under the client_lock Date: Tue, 11 Dec 2012 13:44:18 -0500 Message-Id: <1355251459-18034-6-git-send-email-Trond.Myklebust@netapp.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1355251459-18034-5-git-send-email-Trond.Myklebust@netapp.com> References: <1355251459-18034-1-git-send-email-Trond.Myklebust@netapp.com> <1355251459-18034-2-git-send-email-Trond.Myklebust@netapp.com> <1355251459-18034-3-git-send-email-Trond.Myklebust@netapp.com> <1355251459-18034-4-git-send-email-Trond.Myklebust@netapp.com> <1355251459-18034-5-git-send-email-Trond.Myklebust@netapp.com> Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org We may have to grow the session table. Signed-off-by: Trond Myklebust --- fs/nfsd/nfs4state.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index a380a61..ed937c8 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -2224,10 +2224,6 @@ nfsd4_sequence(struct svc_rqst *rqstp, else slot->sl_flags &= ~NFSD4_SLOT_CACHETHIS; - /* Adjust slot table, and retrieve new target/highest slotid values */ - nfsd4_sequence_adjust_slot_table(session, slot, - seq->highest_slotid, seq); - cstate->slot = slot; cstate->session = session; @@ -2251,6 +2247,11 @@ out: } kfree(conn); spin_unlock(&client_lock); + /* Adjust slot table, and retrieve new target/highest slotid values */ + if (cstate->session) + nfsd4_sequence_adjust_slot_table(cstate->session, + cstate->slot, seq->highest_slotid, seq); + dprintk("%s: return %d\n", __func__, ntohl(status)); return status; }