From patchwork Wed Jan 11 18:54:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schumaker, Anna" X-Patchwork-Id: 9511033 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8DE4260710 for ; Wed, 11 Jan 2017 18:55:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 823172866E for ; Wed, 11 Jan 2017 18:55:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7708628675; Wed, 11 Jan 2017 18:55:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E3F672866E for ; Wed, 11 Jan 2017 18:55:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753333AbdAKSzL (ORCPT ); Wed, 11 Jan 2017 13:55:11 -0500 Received: from mx141.netapp.com ([216.240.21.12]:55666 "EHLO mx141.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752914AbdAKSzI (ORCPT ); Wed, 11 Jan 2017 13:55:08 -0500 X-IronPort-AV: E=Sophos;i="5.33,346,1477983600"; d="scan'208";a="175756372" Received: from hioexcmbx05-prd.hq.netapp.com ([10.122.105.38]) by mx141-out.netapp.com with ESMTP; 11 Jan 2017 10:50:27 -0800 Received: from VMWEXCCAS12-PRD.hq.netapp.com (10.122.105.30) by hioexcmbx05-prd.hq.netapp.com (10.122.105.38) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Wed, 11 Jan 2017 10:55:06 -0800 Received: from NAM03-DM3-obe.outbound.protection.outlook.com (10.120.60.153) by VMWEXCCAS12-PRD.hq.netapp.com (10.122.105.30) with Microsoft SMTP Server (TLS) id 15.0.1210.3 via Frontend Transport; Wed, 11 Jan 2017 10:55:06 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netapp.onmicrosoft.com; s=selector1-netapp-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=07Why/hXHLIPnvXgfM6h5HPerJi7PHOCp9Omy/DgN4M=; b=bTAu+gk5KVwHT8q53ZgEbvpoaMouWWlKEoqWHk99cMLqMmDFPwM+f1kbWb1uwawB6aCiEtwgztc0k3S2fE4mF+lyGLa4jt7xXjyUu4EtgDWg9BUxYDcEKlr7+BNi5Ns/6sOyrulATBxVaz1vpJrQe1GEZXULRC/+E+gEBlRkUpM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Anna.Schumaker@netapp.com; Received: from gouda.nowheycreamery.com.nowheycreamery.com (99.9.112.69) by CY1PR0601MB1642.namprd06.prod.outlook.com (10.163.232.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.829.7; Wed, 11 Jan 2017 18:55:05 +0000 From: To: Subject: [PATCH 02/11] NFS: Change nfs4_get_session() to take an nfs_client structure Date: Wed, 11 Jan 2017 13:54:45 -0500 Message-ID: <20170111185454.9315-3-Anna.Schumaker@Netapp.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170111185454.9315-1-Anna.Schumaker@Netapp.com> References: <20170111185454.9315-1-Anna.Schumaker@Netapp.com> MIME-Version: 1.0 X-Originating-IP: [99.9.112.69] X-ClientProxiedBy: CY1PR0201CA0001.namprd02.prod.outlook.com (10.163.30.139) To CY1PR0601MB1642.namprd06.prod.outlook.com (10.163.232.16) X-MS-Office365-Filtering-Correlation-Id: 872b3be7-f4d0-420e-ba92-08d43a535b38 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:CY1PR0601MB1642; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0601MB1642; 3:FNExrxP8tywfoqQm+nIRcP+qf6I33cYBhuwbYvPCkqzigj1GKhjd4luAUb1g9Ns9HgQDzno1zmbPEb7HPd7eFOIDR2lSqoqtp+ADavxnOEgBoFUj1NcDozC7iqNYJbwujaz2oQLGOPW9uL3OZuDjWf5rmeCZy4MwGGTgwH3JdnBLIh3pZXDjDFLlbGrh3qC0owAEdgMw0XCFRAeL8fmSzjLVmSH5DqqOkRjAqMG1D/NhQVd2oG1+2lvX39TkEdQ5fceF46ktLi5WZf1n5dtpGg==; 25:6A4UIWpNeks4qEybKEtWpDCHqo1PoDOlu2apPZCij87dp0kSYn2Ug4vKOI1+pEdzE3TwUB/sKLKSQyKSZ5NSX4ezopZEyI2q4T4jSFF/NMEvA3C+9wykes5t8f3gYF1jnt5o1K8+b0rLq03oZnnsoAxq1ul30p3aa7kmZCW3xABpB6rNa19VtQqwB28OTO6LHlID9T3L9zWfjHNI2C9DOLZ7Ty9m+hSRqbRcHFslKDceDd+c6nhd0KSGTLakuLwsJ9U9bZwaaETE0l7MhIQD+mTlZEuzDmgft0D6XF1MOLpBVvCuEFf4c70NyfdcLR9iIPZOWoTFDy23fxu/+1HYS+ApLZoeKl1Cj+qy7arb20k9LwJRC6aEO3A0VWXs0umltl+p6D9ympm6xH0RMY/56S5ua2XuGCpFsBdOBZFWTLwrYU7nYdJDtmtkSuvBKb322vZokZL1yF39TxnxcoWRJQ== X-Microsoft-Exchange-Diagnostics: 1; CY1PR0601MB1642; 31:HIkhGwHkQvTL9hwfdZ2YuJqJJKHr0eR2ikbw/gfwMrItTk2xnBePBXUo9SvbiD87mtQV19Ac5miwgYJvMrZtYq7B592Quj1VFCZ/bE4yYpO1IHTlTiDBbpPfg8DIN6XfdohorW0A5NoXYEbGGGR2z+zIMMiY2maQh2VMFzeANxUnFFr2O2tZrReJMFZGrGS98ye3EkbrmQbFb920zvjZfWaasFrWjC2Z+rW6a4w1hH8WDgqlaH9/nuqr7bKWU7M1X2oDVsI/bYH6C5wt8Estfw==; 20:X8i0VhbNwE/xvDHbOdy5ck4IHw75pC9aa/D7g09PlsPNOMZwfPacAOvgylWfn6EGdTl3usbWEBT96PIGf48VvKn/vFJhcFgyBwhLJ1fmt/U8kB/M8maEeaf/4swuzJfnxSg63h2Idx9UJpEII/qBtb1H/7fX4Ujpp4Vv5zR8mgCiG0Zwr1Z2QHEK35DXbDJEbz3LTcA2zJavQBuxRNJuew8pdvbEA+h7IIwH52v1QV3wKuYprNKgzOpkhqCqQCHCCJx1GHaiwzhTshEIXWbI2j31Rrgz2hWOnL7m6dbs9egYSW2OX0PeRkyF6C0D1wnJFZeY3mZHEPjjCV6yfd47a/hledCPD0TR0gIqObD25DHWKugDLeFziUr82jyq6pU1URcxh4SivKJNwUOYRupWUqFBy31atss4RCaIM+OVimNqKxXy7cuJpA3j4g6+F5ufm5WWo1YW2ltHMrdwbkQzf2M7bwTlMKYNPz09BiSjgJiD6oBbkhDHrczGou+CDNzd X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(158342451672863); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026)(6041248)(20161123562025)(20161123555025)(20161123564025)(20161123560025)(6072148); SRVR:CY1PR0601MB1642; BCL:0; PCL:0; RULEID:; SRVR:CY1PR0601MB1642; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0601MB1642; 4:OV4tKNFZtkbh/a/qSc5nY1LW5Amvqb1B/WKbDpIrKX/34E2K/B2FArCeFFy7CXNY/Havgv+UsHCRwnp1D/oK3MZwcx/QP1KPbFJPFUKoJRl+mwB65fXRlXHzZTUuajVdmPAX3KTaPdl30X9HwAH/dTYSxLr49ffu4sWqLgij+VKimZGyPMIEY81r7Dmf3yKKwai5586GJinpOSkwO529pE52/5389uTKDlwgOGqzdCJA1Kto49O1hiYJwooHr2oMxsKC3iFdA2y+vU9P+9ezHwjhy9CuVIKc+1qVTQ6YbAEEoZT7YYt+e0WFS2MI7z90FxM43dCE7AM7DHmHWqTDXM0srp/EWHWmE6yROjY6DHXahDAlKfnVqetPjYyjIgaLDl/K4kRP96mXatTc0MxvWmrOZWGUwnSkhd6cH5PsKqjkFeiQjLyOYibobrq4VriQIrBMMGYC2EXw7KQgSWECy22j2H+sy5kyJp0u1dE92jQoh6ZjDSmBeENXsyTgzflzf33zE2/RW/7oPTyZHj1YlRpM95ccyMIq9Znpqc4XR9N6T/HwBcKjXuyPxJ7eUWAfx/IvwdSXTK/gVN4g/vGPwiP75BuncjD4bvg9nNXpP00AnJOh7MuxVYGtk9wQ5frKpbVe/6kqbAVA3EBtLejxDg== X-Forefront-PRVS: 01842C458A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(39450400003)(199003)(189002)(50986999)(2950100002)(6666003)(6916009)(101416001)(92566002)(38730400001)(7736002)(76176999)(25786008)(305945005)(86362001)(2351001)(5660300001)(110136003)(6506006)(42186005)(5003940100001)(106356001)(105586002)(86152003)(2906002)(2876002)(6486002)(66066001)(1076002)(3846002)(6116002)(189998001)(47776003)(8676002)(107886002)(50466002)(48376002)(97736004)(36756003)(450100001)(81166006)(81156014)(6512007)(50226002)(68736007)(15760500002)(309714004); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0601MB1642; H:gouda.nowheycreamery.com.nowheycreamery.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: netapp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR0601MB1642; 23:RlIroh5tDymxbzIbJNKbXBxZ51U3xTuFDq3vV3v?= =?us-ascii?Q?x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1hMNktY6coy+IxksyQZ5hic7QFDglALrY0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR0601MB1642; 7:1OA+u0JlGpB9Fo+k11pBofVC/nIk5cV//BoznZE2zHl3OZhVmA4sgaZkMcegzKtVzAXs3JUa6RNclVIYKvcJ+BtRH2YcPaDVn5QWWJ+raO0O9qletJKsYTnqBi2RqjObX/+k17poh2ZHieDGQmI7X4tYtg33rB2qPXgwu72A0juLKX6O+kzbPtVY5ETL/sZFrOi3oci68ECbGn1dxy/zbcweLz76+5B64kZJHGOMlcDjDxO4nb/vtolpAFZzUkFb+t5F4oDph/X0OpRKpdhcfGP8VDBkyWxVwWAEzbrrFg0eRLnNI87+IHktqdwDSv+uKgUG5MklIyCWiV9f891iMvlRkj90t9swVoZy9BndCbHVUzqu4Jq7QJwipGPa4DYxzS08mRzuaBKGAnjjLuA49ae2tHwHtL1ncFmmwlal0zbyLECOEoBJM8EyRUBQc3Vmdc4BEObURp9Igl6MGwfE5Q== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jan 2017 18:55:05.1051 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0601MB1642 X-OriginatorOrg: netapp.com Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Anna Schumaker pNFS only has access to the nfs_client structure, and not the nfs_server, so we need to make this change so the function can be used by pNFS as well. Signed-off-by: Anna Schumaker --- fs/nfs/nfs42proc.c | 5 ++--- fs/nfs/nfs4proc.c | 10 +++++----- fs/nfs/nfs4session.h | 4 ++-- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/fs/nfs/nfs42proc.c b/fs/nfs/nfs42proc.c index b752d85ad8c6..b03010eebafd 100644 --- a/fs/nfs/nfs42proc.c +++ b/fs/nfs/nfs42proc.c @@ -332,9 +332,8 @@ nfs42_layoutstat_prepare(struct rpc_task *task, void *calldata) } nfs4_stateid_copy(&data->args.stateid, &lo->plh_stateid); spin_unlock(&inode->i_lock); - nfs41_setup_sequence(nfs4_get_session(server), &data->args.seq_args, - &data->res.seq_res, task); - + nfs41_setup_sequence(nfs4_get_session(server->nfs_client), + &data->args.seq_args, &data->res.seq_res, task); } static void diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 6dcbc5defb7a..d1fde35bfd7e 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -953,7 +953,7 @@ static int nfs4_setup_sequence(const struct nfs_server *server, struct nfs4_sequence_res *res, struct rpc_task *task) { - struct nfs4_session *session = nfs4_get_session(server); + struct nfs4_session *session = nfs4_get_session(server->nfs_client); int ret = 0; if (!session) @@ -973,7 +973,7 @@ static int nfs4_setup_sequence(const struct nfs_server *server, static void nfs41_call_sync_prepare(struct rpc_task *task, void *calldata) { struct nfs4_call_sync_data *data = calldata; - struct nfs4_session *session = nfs4_get_session(data->seq_server); + struct nfs4_session *session = nfs4_get_session(data->seq_server->nfs_client); dprintk("--> %s data->seq_server %p\n", __func__, data->seq_server); @@ -8389,7 +8389,7 @@ nfs4_layoutget_prepare(struct rpc_task *task, void *calldata) { struct nfs4_layoutget *lgp = calldata; struct nfs_server *server = NFS_SERVER(lgp->args.inode); - struct nfs4_session *session = nfs4_get_session(server); + struct nfs4_session *session = nfs4_get_session(server->nfs_client); dprintk("--> %s\n", __func__); nfs41_setup_sequence(session, &lgp->args.seq_args, @@ -8785,7 +8785,7 @@ static void nfs4_layoutcommit_prepare(struct rpc_task *task, void *calldata) { struct nfs4_layoutcommit_data *data = calldata; struct nfs_server *server = NFS_SERVER(data->args.inode); - struct nfs4_session *session = nfs4_get_session(server); + struct nfs4_session *session = nfs4_get_session(server->nfs_client); nfs41_setup_sequence(session, &data->args.seq_args, @@ -9111,7 +9111,7 @@ struct nfs_free_stateid_data { static void nfs41_free_stateid_prepare(struct rpc_task *task, void *calldata) { struct nfs_free_stateid_data *data = calldata; - nfs41_setup_sequence(nfs4_get_session(data->server), + nfs41_setup_sequence(nfs4_get_session(data->server->nfs_client), &data->args.seq_args, &data->res.seq_res, task); diff --git a/fs/nfs/nfs4session.h b/fs/nfs/nfs4session.h index 22cb55015b2b..f6378d95b1b5 100644 --- a/fs/nfs/nfs4session.h +++ b/fs/nfs/nfs4session.h @@ -103,9 +103,9 @@ static inline bool nfs4_test_locked_slot(const struct nfs4_slot_table *tbl, return !!test_bit(slotid, tbl->used_slots); } -static inline struct nfs4_session *nfs4_get_session(const struct nfs_server *server) +static inline struct nfs4_session *nfs4_get_session(const struct nfs_client *clp) { - return server->nfs_client->cl_session; + return clp->cl_session; } #if defined(CONFIG_NFS_V4_1)