From patchwork Wed Jan 11 18:54:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schumaker, Anna" X-Patchwork-Id: 9511031 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 71AB860710 for ; Wed, 11 Jan 2017 18:55:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 667252866E for ; Wed, 11 Jan 2017 18:55:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5B2E128673; Wed, 11 Jan 2017 18:55:12 +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 D37C228676 for ; Wed, 11 Jan 2017 18:55:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753225AbdAKSzK (ORCPT ); Wed, 11 Jan 2017 13:55:10 -0500 Received: from mx144.netapp.com ([216.240.21.25]:63691 "EHLO mx144.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752882AbdAKSzH (ORCPT ); Wed, 11 Jan 2017 13:55:07 -0500 X-IronPort-AV: E=Sophos;i="5.33,346,1477983600"; d="scan'208";a="169890538" Received: from hioexcmbx04-prd.hq.netapp.com ([10.122.105.37]) by mx144-out.netapp.com with ESMTP; 11 Jan 2017 10:49:38 -0800 Received: from VMWEXCCAS12-PRD.hq.netapp.com (10.122.105.30) by hioexcmbx04-prd.hq.netapp.com (10.122.105.37) 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:05 -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=1P+DtUSa4QwhbibMC7Ttj5ybS0dVPfmO/ZE2TlqKeUg=; b=VWxKqprARWlu5X5MBfRjdod4BpPNk51ZXcvEr3DvaG00yRfOoGvOEqGMRlVXUMV4WvC7ONKy+e5ETpE0E+hz4Ng0QM07EXnEJAQIDf4LwCKd2JOVeyFabZLb8k48fcQHdScWTrWuIwm09GZXQO8OE9zJ3XbJrkeTd7Pe9o2h6wY= 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:04 +0000 From: To: Subject: [PATCH 01/11] NFS: Move nfs4_get_session() into nfs4_session.h Date: Wed, 11 Jan 2017 13:54:44 -0500 Message-ID: <20170111185454.9315-2-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: 9670ae2f-4702-4f99-92d5-08d43a535adb X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:CY1PR0601MB1642; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0601MB1642; 3:fe6J9n4+4Oi1i4ad0KFX0DamrgE4HMy0QT6CzZbkdqC2BlHqD+mpI0/gs0XN8HOlSE3CEsj0CHTsAo2fv1irFBqTM4uc2j8bXi7yjgjbyI/zYs99iCaoyHDWZ26sUzI0k4PyvLGUhjpI6bPkwQ2oodkPkn/VkMwU4XwnU+qXl5xlbFz3GC/Gk3Pj8PPTrFMrquAcbx5yLlgTOp2mWmNxmmCS0BEEYxIOZKP86c4zc1kohsWD9adghHTEqqEEisLR2UTA9uHPkkhKTZ9tlLeuBQ== X-Microsoft-Exchange-Diagnostics: 1; CY1PR0601MB1642; 25:Y+THynJb8KKYDUjjcuG6ThhfseA2ti47pkTipelFUyHdbzqbaU6b1K8/Jc5tzKH4DAUDO54m+CxO36d7bpz5KrdMz6bkN2wz/X7cNwbJMV/vkiPm/iHf6dsh0ayPdw9QtYzCrz7Bmm6KVvc+lt/E87AXtAFfGClSR7T+pG1w26+O8QeBzlIVmOJQ/MEaHPaBQoOh8Cky+32rCOZvSLcqgEjxtQeD8T+cIo+YIRVQv5cTMgK3xfmGvQYSlYGaGg/CLND/dkv9YOkTXTR83izIdLUjQOOIiNzoHxSwpHUJXJjEP8EmkHh3OO5dRvsE7z3w7VUA+YDNUZ3q3aUF58shv9Ad5AVZHqZqIj10EBXY6pYMW5NRBfp45vGAOXK42vTts8MOJD3YUeQ+8MWfNcwzbviSiMT0BMHlfwPE++6criRajusZPkuEGw6V/AO3IjFaAi1m4Qvg+xk574oc38DbCJE1R03MFjY3hsw5C47d5lMDXqB0Vz1XEGLSDtmLOB+5u2lWnugMJjiMhvWeR7dT/ecOeoJiE3ZwA101wpqo1//6Vf2x7BYsWvqYB7RvpAqJmh57L83pPaEZSUYZBSrq/2aPYkCZ1POPTZJLlJu0qkKYzMeuIhBNgvcAT161eGrG7IcTqKFN8n0bWB5JzG+ysvtm+46cuht/Xr36azSCS9ZlSIlGwe51FqaxU/VcuDIfduQRcPsvXbYeSxRz7nolGSuf6EZBajspCI6+oAcZeKnx/8SboKfevUv95ynpSznv5RY8YXHuIRzmKCsRwCtUaA== X-Microsoft-Exchange-Diagnostics: 1; CY1PR0601MB1642; 31:7WdJ0jmpYE3ntyTG+R+Q6plElMOOMLIjatD1lR6+v29G7SM+4KjbDsCgeDoD0puXTE+TAsXKU2zngCKMfkvWVhz9fUEEFBGnVW/RuqId5lEzhKamJY3CnhoZO2QESlMjTkGPmGP4y7JjVXn5wxHUlxILzY/TC92kVZHwDiWy1q7fh9JsUJkdQsw9aT1uzhQn7CI+znrbJybcWwwZhnMrOGikydL475oTXA9iVxteoCj2EJiss7/pOPIazDXRNknLszwpWPFeUQE7WCRqVbJXZnZiHm12cOPuOBw1go043OM=; 20:riPkNfLURHgJegMZTouipDDYdEkRDqKwWCJaUgzMXh0UmJCm5WrKroOuyRAnaObR5qpjh1pNnmfkDw18E1OxEMpUYbGi+LeNjOxK+4IjnHTKuz5ON76Z4orWZt0de/aHGRMb6qlHcAg2AJk+8pu69K/P8TxGpgTkjQZ4IvG1amHu4e58wgqCuzQ9YJhG+IQQT9yw/cGKITbIRyl/tzrGCN7MXohSP65zMv8p8YI9smq3CLIzt+4jGCXVt7hJDGI1+jle8QXX32xi+dPS4WgcPNoQx9mrcOJcDIneBM+z4agC6Ko6uCgy3ZVBb/xO3hJZ+38Z2ThUVuqvYGlP61qtscdSgD2rok2qQW0E8eMfDF9UYz2i65QZPFxsfEgamZVwvo0fmXtnWSMFQBIfC9q71EmMrA5LZ6IVDlqemGcNP9iYynKgLabjnnthhaHYQYVnKB5OHuSx52/Y67t4nVgFuv6ycmc1zDS+rYWL5dE34G/cr+FTA5s93sLtqaFKeMyZ X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; 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:sfAUeeSjXXi6dSULSPyNOEZYSojUTUU4NIFZtMgMmjuMD67couNXAgpHTQv8mxDfxORPFDv0g2UzJ4LfleexifQGraRs/ojMfTAdMM3a0VyCOAg3SJgZoJ0jngZj5uG1VxvJE2i5CUta2CJfBFgfbSCM/XH79gkAPgVBUtIC3s0nI12xnupZT4Fh+zDCBMSjaK5LM6BgtfvO0MtyKSvJ4SMShOFKUpaTeZYcZoaDPFDKAhlowO1racUAHvXRzfSgSTypcbKW5vM3kM9ApyRD/qEiC9u53yAKrvBitdfNt1+yQ78zRz1xjD4lizaTyER9KOIk+/fjEMy0RmNuvDo+YQKGIScJPxW7nKoAR+Xu3Y3ADx6gDVb5QBEnRObkcJ8wUNCjg2jDAyAdCpgWa2UbwGynnuOpqWFw1g4XR+tsStZ8AdExZnWKLulNRiHOAHCBLSBrGSGf6/wn6Ggs2PQqiWkMztz+gCsnvw9vOMb4070b2p62roxbhZmdMGu7xTntyGUBM80YaLrKRI1q8mDYuxjx+MoLJpfwM0G12hVdWWu/RQgF5aUhHlTbFlTJiKb5j22LYP3X8umaisL9IeQhqQ== 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:KptxqVmpAp8e0CJffvuR2CVu3M+o9vAE3LXLAMv?= =?us-ascii?Q?AGnwUFkUkLVAFxjyvOnffgx2Jc0kDrGdJYAMrUKBvLQJBM7lQIijT/x2WuAQ?= =?us-ascii?Q?HqGfxBURTTdoZSnrzM/V6qOO5M7Pe6xdgFpdVvIjCSEVyWd8FTyxhxcb24OM?= =?us-ascii?Q?rAlBp9EPCSzjHymf0Ep78NSOn8Nxau6fx3uStqGQL8eX5dHRLEedORtTxZID?= =?us-ascii?Q?b9b5uNZQ+bQTMhzq7u3WMGhT/gblRbdravst9ey8m3lXN45Aaii6l6aQPaSg?= =?us-ascii?Q?+QxzWg7Oqv/bBMzzjem1EGWlLJ5kWTyktysHzniT3YWZ2YrJYND7yMAodjb3?= =?us-ascii?Q?DP77CBnuFjx5Ol3d/uwaPTAfnFebGc3RCgrus86KfjHNrmFUrvYDir/8L3Hv?= =?us-ascii?Q?4NqR1va8qkSpvX7uISeLgfs+Ht0kxa81uutV23qGdbssS0Lm2/UlMTA0ICc/?= =?us-ascii?Q?eUHpPcfwAZ4tEv62/igjX3Xjkd0InOUymftob97PD+yO1jHXgBcd6/zqvy59?= =?us-ascii?Q?7vOkocg8T96mCNifxmIjuxdEbb20nTXRAxOu7onnPG3V+D/73ZDH45MU0bFO?= =?us-ascii?Q?11xfPsObkbSKTKkiwHlYNcAetk5jviB9RALBQaXvRFCOLJA5HdwK+pljv4QH?= =?us-ascii?Q?09m576VcrZ4M0vvfi18OY4wU9xJHTy4DBUDV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og+S08IXsI+0zm3DlnMYnhooO8Mj5e+QLBgQAK5s//wtigBCar1QSc=; 5:F155suQPEivjbj9UidP8NwV9UDu5A1pnf1I4+2BIP8CQI2U+QN3NmupyXAWgFmVJXJiA5rjzwHLbE+UFMshCMTvWZSmU7UO0KOMMEO2tNi/Ow1G5+0FsAcSy5AsZ2QV8NS+cpK3oFOoSkDVfJLVdNA==; 24:g7f6pNL0yvgxdoHFJF8yGxGjv52N/l15sjfL+nTAkj7DY18Yal2a1rfvEz2kIsJ+nWGYHf47B2WGK5+GbRVBvnvOXFiSaAyRcQ2jhi58DuU= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR0601MB1642; 7:IZL/UZs48e7YN8HWoXofo9C4Kdq1L/CO8xHDu2BOF2oQ6QLLCNzKLhLPxD6DWWGGVp9XlFDLwm58TyKjDX+H2ZvUVHUSOb1bUYTcGFoBYs/1NlnV+unYWzD+u8rT4LL8G5Q7KyeI0ivB2B1+l2P+txE0c2UF3tzgIF0Uchq2W9uBCH+5tBwCVyHE29h9DPF3NgcUfQxRsbKA8dWQeWLqpo4Aq2sqh4QCOdciwVwhpkDkXtnnlY1Cm0oE422eHZfJirxVDAIBeJ/GsTK17PX+D5CmYja8Rq5m9xoZ/l08Na5qpKzD1snEuG+mv46tPLQd9BZu2txIG8pfiBo7ke4TjqXC4K65PaIvl7JyPU7awPzizFhMRymsro+6UJLwUNo1p2Zi8ESbuE0jbHmfU8YW7l78eYBsrGlVWmxIOUKgrkvXHwOCTtvnysd/2okUE77g8EQYiL93XTn5TfVe/WFnpw== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jan 2017 18:55:04.4936 (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 This puts session related functions together in the same space. I only keep one version of this function, since this variable will always be NULL when using NFS v4.0. Signed-off-by: Anna Schumaker --- fs/nfs/nfs42proc.c | 1 + fs/nfs/nfs4_fs.h | 10 ---------- fs/nfs/nfs4session.h | 5 +++++ 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/fs/nfs/nfs42proc.c b/fs/nfs/nfs42proc.c index d12ff9385f49..b752d85ad8c6 100644 --- a/fs/nfs/nfs42proc.c +++ b/fs/nfs/nfs42proc.c @@ -12,6 +12,7 @@ #include "nfs42.h" #include "iostat.h" #include "pnfs.h" +#include "nfs4session.h" #include "internal.h" #define NFSDBG_FACILITY NFSDBG_PROC diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h index 665165833660..04ffea093d56 100644 --- a/fs/nfs/nfs4_fs.h +++ b/fs/nfs/nfs4_fs.h @@ -273,11 +273,6 @@ extern int nfs4_set_rw_stateid(nfs4_stateid *stateid, fmode_t fmode); #if defined(CONFIG_NFS_V4_1) -static inline struct nfs4_session *nfs4_get_session(const struct nfs_server *server) -{ - return server->nfs_client->cl_session; -} - extern int nfs41_setup_sequence(struct nfs4_session *session, struct nfs4_sequence_args *args, struct nfs4_sequence_res *res, struct rpc_task *task); @@ -357,11 +352,6 @@ nfs4_state_protect_write(struct nfs_client *clp, struct rpc_clnt **clntp, hdr->args.stable = NFS_FILE_SYNC; } #else /* CONFIG_NFS_v4_1 */ -static inline struct nfs4_session *nfs4_get_session(const struct nfs_server *server) -{ - return NULL; -} - static inline bool is_ds_only_client(struct nfs_client *clp) { diff --git a/fs/nfs/nfs4session.h b/fs/nfs/nfs4session.h index dae385500005..22cb55015b2b 100644 --- a/fs/nfs/nfs4session.h +++ b/fs/nfs/nfs4session.h @@ -103,6 +103,11 @@ 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) +{ + return server->nfs_client->cl_session; +} + #if defined(CONFIG_NFS_V4_1) extern void nfs41_set_target_slotid(struct nfs4_slot_table *tbl, u32 target_highest_slotid);