From patchwork Fri Apr 7 18:15:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schumaker, Anna" X-Patchwork-Id: 9670131 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 2F56260364 for ; Fri, 7 Apr 2017 18:16:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2748C2862A for ; Fri, 7 Apr 2017 18:16:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1BDA628636; Fri, 7 Apr 2017 18:16: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 8BBBD28635 for ; Fri, 7 Apr 2017 18:16:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755526AbdDGSQM (ORCPT ); Fri, 7 Apr 2017 14:16:12 -0400 Received: from mx142.netapp.com ([216.240.21.19]:19461 "EHLO mx142.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932731AbdDGSQB (ORCPT ); Fri, 7 Apr 2017 14:16:01 -0400 X-IronPort-AV: E=Sophos;i="5.37,167,1488873600"; d="scan'208";a="181464039" Received: from hioexcmbx02-prd.hq.netapp.com ([10.122.105.35]) by mx142-out.netapp.com with ESMTP; 07 Apr 2017 11:03:50 -0700 Received: from VMWEXCCAS01-PRD.hq.netapp.com (10.122.105.11) by hioexcmbx02-prd.hq.netapp.com (10.122.105.35) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Fri, 7 Apr 2017 11:15:59 -0700 Received: from NAM02-BL2-obe.outbound.protection.outlook.com (10.120.60.153) by VMWEXCCAS01-PRD.hq.netapp.com (10.122.105.11) with Microsoft SMTP Server (TLS) id 15.0.1210.3 via Frontend Transport; Fri, 7 Apr 2017 11:15:59 -0700 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=2hkHhEycOBEAuTSA5fXZwWFYnyjiNcd+peVBC66SGqY=; b=VQqYJozE1Ck889iDAw4GucB3x9RnCG+qKGAmnXXJjmn9x06SjvxtcrCrE6fncnpr+U3O9p7mq/ObBT6wzdjQ4XQrrWzcVb5AfdIbELxgG+qI+02rLzeG9RQ8ZEnB7jkl1GulvdrUK+wj1Y759pASt5P3bJu3KghT0y+0e3o+Zpo= Authentication-Results: primarydata.com; dkim=none (message not signed) header.d=none; primarydata.com; dmarc=none action=none header.from=Netapp.com; Received: from gouda.nowheycreamery.com.nowheycreamery.com (68.40.188.1) by CY4PR06MB2472.namprd06.prod.outlook.com (10.169.186.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1019.17; Fri, 7 Apr 2017 18:15:57 +0000 From: To: , Subject: [PATCH 24/34] NFS: Remove extra dprintk()s from nfs4client.c Date: Fri, 7 Apr 2017 14:15:18 -0400 Message-ID: <20170407181528.2832-25-Anna.Schumaker@Netapp.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170407181528.2832-1-Anna.Schumaker@Netapp.com> References: <20170407181528.2832-1-Anna.Schumaker@Netapp.com> MIME-Version: 1.0 X-Originating-IP: [68.40.188.1] X-ClientProxiedBy: DM5PR20CA0021.namprd20.prod.outlook.com (10.173.136.159) To CY4PR06MB2472.namprd06.prod.outlook.com (10.169.186.140) X-MS-Office365-Filtering-Correlation-Id: 6ea703c8-ea0f-449d-ebed-08d47de2236d X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:CY4PR06MB2472; X-Microsoft-Exchange-Diagnostics: 1; CY4PR06MB2472; 3:ztpuVSxEfq3opgP5NSchXBrluAgtcMlIyG1ikoApr608CuhbVkaTmcUvtn4yH4INoh0xJLqABvGDH/QeKYY9zDccpP8+uMDBdUWvy2qp9SA1Ov+VMGkMk+wTV4uuBCbUfijlkHxvdSW8ONttfAos+hUb9aYdHbq0FOMv936XkvcpsywEVMsoWQUJhHe46BSadqZ052UD5vjQLowHGoFLr8+UWWaVLLXy9cSmamM2Nw0bIjun9POZMMDPDwmbLTDn2XL0q/3XkAYRUxQ0oxpZPJiZ+FctalpHJAy2/jmiDowEXZFqVtrAWuAcoco0YWduxfTck2paj5xbCTZxQHohBg==; 25:qTD0ErS1r4OVSr9zB9QFcxK9WSc7TkG4XImugQZu0aFATxeFZi4G7a+Rv0v+4Sce0XXk6EdkGl8+OUEG0fgc3S5M9j/vB8c3Wh2O8peqt4MkaRRaYk9aGSWuEPyt0KW8JniSWV7IzISJ8EOTOXZ0wgp9uwmAT0ALvuiWNZmQB4NYnAQjb3THtEPAe7ujAYwXIiTYYdCpwPgwmrDMIp9hZPS/56AjojdVc7FjgpgIsYLRFjE2ymaP42Hamq8sty0dTElgTpeunHYqXaRVE6t+5qfUXcL+98jzf71Xgi2RhHHPoUJsxqHjdKuewfoG/ikMzmSg9ZV2V5gqS/C7O+4y9n8Zmq8pxbZ1uRamagT2NXQxhc5TTUom3wN13avnfm6/ncMuOzh6tvFb6hZ3fOJdD0XvIaeCbDIFvzcOpq61CM+Mj3bJKwm0DbF0MQlyFdri2IAcFhpmM/ldPTXT+nuTGg== X-Microsoft-Exchange-Diagnostics: 1; CY4PR06MB2472; 31:d9FMdWzAO9athRWEw8+uO3i81UUXreP3Uc1Mu0ntp6yDY++0jK1jcLDWMQiLAjyczcVq6ODOMpIiW8la4rZJeOCQZL46kMiFQNB6HccaQH6dNlgNuuP2IZuykBkr0u9NUenPcyz/V6AAb0J9IdEHjKKxq1nxFBO8YKYExBlbWIPln+z0aiPHKYToOLAq+sb0ZGxD6n9OPZrbPkqO8RpIdZvePqh5fxxSYCEhIux8Bjo8hIijKhgiqoiSCCJZA/+7; 20:+QXgiMrtafLelQ9DZjSfohQAN6d0Ija2UsU0MzkQiGeRUeJxhYbjwmNE+pcBL6YUZansxpaAEiZjWEaq4UnsqGQoFslaIRCIPe9/AeQHg3I4w20fFoQWGJqSd/9+pGx/7RQG7t+7ulQ7zmEKeA/voB6AYKTzyUz/eMDW04pOyOhOA/6Cvv1GN4dSh+SHjTl1fmpPCRjRcZmm8ml9mRtGAqpbqBDmhne9R/t2KPWSzD4ve5UOKpC9+vV+ocTyd3UV20PS0l8OWRfLW1MUe1l+Lx4Oyi6x/fHVq/FCC/KwKD47A58NdduJ6Pu7uVuaFjkTqwe8dgXuqa/lqISCTCXm+9kNPHG8RZuUdnk4SP2BarSP9HZ0MGAGNxnQ2x4ygZ87YxP/emCMmcqZqlmnUX+Owf42ukzCjVFY3DLOPEBm8oHe8HoR0OgjMTZW4dgF+fT2u+lBwK/O8DAFhwjitvnkgwWMG/uBNiL7VL8oRkRSpSeKTK3CCSJe4Fk8HpLre62w X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(158342451672863)(150554046322364); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93001095)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(20161123562025)(20161123560025)(20161123564025)(20161123555025)(6072148); SRVR:CY4PR06MB2472; BCL:0; PCL:0; RULEID:; SRVR:CY4PR06MB2472; X-Microsoft-Exchange-Diagnostics: 1; CY4PR06MB2472; 4:aPfonvmKg3s3uYGXsZ5LuFkpj+CcUmJKRNp7SBXwy7tg3X+WMhK8BCUp42z0ITliErMz8WT0sEp+GG5HrtvtJsMhSXzmENZ60TTnfd/Xw/lqNGbJY8EvMyGt4paARVZJe2EGwZQyWfdR8ycP2DqOZ8wZRFGajnqlvNnTX1F68PYoD4WJzy2IqSfeddn/C++jN4tWL5imX0DZMbD9ElDhzarKHSLusjob8oB8+tuC3Ns7MJUeBZEob7LmTAW6v0VBfIKEtE1aUArDc0xE7dhbtCd6vFeLcJ5hqjN6w9LMaXbrFUhu7bpEjbXEqZm4HROBeB/hnU17CgT95BndJLklR5bA1xU4bFG3QVuGmVAqSkng+EThEEXWuZsm6lMx5rP8xIqIK1vS/mhdpl9U94IXNSdssmGFqEuYDMuP3SKcSLrRHK4+zlZ1/TI0RcXsnWRLzEXuRQurrr3r2/KmjAFJAk0tC5mQYmVdcBmJGq5jQLzFYCknZH5UY3OJvMNLOGhMujrFAY1IN2acjwZbVvOzhoxUm/hg1fzoPa2d/s/V6IoOxOQH0zqE9RoyfWXKEMFIMCbB7MwN8Vdmd2e7TDcurRu3EIx516SJtfunihLvvPoJWaozWsBfFjYUi3EFob5n1A10dU1gnWge1IrhFCcEuUuNXz0y3kp8YullnJhQN4EokWLHSutYPZDf+GfTmu1gaNPObLidFSzHH3iVCJ7ZEwsTo/wfWusFkD9fNJN1YiU7kg7HlEpD5suydDtqkfAZlquNfDECVgK1Epl1imbM564yX4l11Nc+IPfP7OmXBQcejMW9a7QY2TjQ2XlV7ONe X-Forefront-PRVS: 0270ED2845 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39840400002)(39400400002)(39410400002)(39850400002)(39450400003)(305945005)(189998001)(2950100002)(5003940100001)(6666003)(7736002)(86152003)(6512007)(2876002)(6506006)(6486002)(36756003)(5660300001)(53936002)(25786009)(38730400002)(76176999)(50466002)(81166006)(8676002)(50226002)(1076002)(6116002)(66066001)(42186005)(2906002)(50986999)(47776003)(86362001)(3846002)(32563001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR06MB2472; H:gouda.nowheycreamery.com.nowheycreamery.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR06MB2472; 23:DGtsPMSoq2QUl9+O6YhX8lBwmNNq7aWUS31g1IJ7L?= =?us-ascii?Q?nwwyyFsbsLDVVUm55w28qdoCt3SGOZNOeVbTZ/qbOq5lF7VYMdVNaE5STntX?= =?us-ascii?Q?n3CgT/GrzWvpU6vbFGYvUu2AlqA9AKp0F6TPUDA3RZI5loKDWlmiubX/eLA5?= =?us-ascii?Q?V43mmcRXkpI0/Dc8jkLZnWVmnhJ6DEoJ1Ui04C+NPL3ejxSxswQ8csDXJ2hK?= =?us-ascii?Q?S/8PO7o/yEKole9EzfuLSu2TbOTkioa3CK9cRdp2HNQab7gAChPxrLx7kvBE?= =?us-ascii?Q?uESgTncbNR8m70cQEGKpxxA8wXgroNQ06NMpAHGQSOnqObfb2mktM6kehKUI?= =?us-ascii?Q?mle3hOephLMGYbQ41zLkbJW6pz7Bb3oVqpw4XItckE4NW+yvr/u++zcROgOC?= =?us-ascii?Q?Z8NaUwarQXCKhanMt0h0ScAe2k5jAuyV8HvR2T62qsqGBCc0wEeeZY/r9xer?= =?us-ascii?Q?61rv/lImHHxDlh9KgnU5rkSwXcA7I9HM3zad6BrhgcoSjfaqUWhVslr7KFTu?= =?us-ascii?Q?3Hjo6Ng2slQP4/RbkhE/5Wcy67l+EsIXKPG437Y7l0mJywSCbpfY5mm6bAPr?= =?us-ascii?Q?wLR9nhnJyqUsiZRShpnvbHKCHbwAoQ4wI3N7qX2DTf+ndufM68GKtrRq3y1G?= =?us-ascii?Q?v2itErcsE2xhNQL+rLZOJWyEuHGKT6t+9UlHeXQpd8CAZ0WUgI4W1rTgAuXS?= =?us-ascii?Q?E+LX2FNVVlzZyjXIaeJ01q5AfW9v+Mt6B1s1/EqqZW0dU6mC6S8ZOiUdRFzB?= =?us-ascii?Q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GdpMFFhhOLCsKho= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY4PR06MB2472; 7:N67FHbA27f2rXNWgSfLMfKJCUhG/IzfIQoNUeT5F4mOJdz/WBGnBt9KVtGJDu6NFJ7YdGzwuZHDPSMdqjP8LeVHbauI3E+ARspsCYQgR6hrYzsQln+t8h1u6AagkT0GpHnexojZfskHIulWXuxqZiyVOzDwcDUX/PV8WUWdb5z+8th3ugc/fUFgSG1Pw6UvBLevEoRiIxffrW5hodvOk3J0rbFoMb5Z8ZfKIHnOgEWHr0RmoeMdRaU70TcJ6zeU/OZNUwW2XPgMJbaUVfN5Zx6XG+uGBSQXxVnMnQpHk6maZeCEF4gQCdmnm5GiaGO64ujUorTS3J5wmF16u5nP6Dw== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Apr 2017 18:15:57.3717 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR06MB2472 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 Signed-off-by: Anna Schumaker --- fs/nfs/nfs4client.c | 62 +++++++++-------------------------------------------- 1 file changed, 10 insertions(+), 52 deletions(-) diff --git a/fs/nfs/nfs4client.c b/fs/nfs/nfs4client.c index 2e7fc76cbd4b..692a7a8bfc7a 100644 --- a/fs/nfs/nfs4client.c +++ b/fs/nfs/nfs4client.c @@ -359,11 +359,9 @@ struct nfs_client *nfs4_init_client(struct nfs_client *clp, struct nfs_client *old; int error; - if (clp->cl_cons_state == NFS_CS_READY) { + if (clp->cl_cons_state == NFS_CS_READY) /* the client is initialised already */ - dprintk("<-- nfs4_init_client() = 0 [already %p]\n", clp); return clp; - } /* Check NFS protocol revision and initialize RPC op vector */ clp->rpc_ops = &nfs_v4_clientops; @@ -421,7 +419,6 @@ struct nfs_client *nfs4_init_client(struct nfs_client *clp, error: nfs_mark_client_ready(clp, error); nfs_put_client(clp); - dprintk("<-- nfs4_init_client() = xerror %d\n", error); return ERR_PTR(error); } @@ -577,8 +574,6 @@ int nfs40_walk_client_list(struct nfs_client *new, prev = NULL; *result = pos; - dprintk("NFS: <-- %s using nfs_client = %p ({%d})\n", - __func__, pos, atomic_read(&pos->cl_count)); goto out; case -ERESTARTSYS: case -ETIMEDOUT: @@ -599,7 +594,6 @@ int nfs40_walk_client_list(struct nfs_client *new, /* No match found. The server lost our clientid */ out: nfs_put_client(prev); - dprintk("NFS: <-- %s status = %d\n", __func__, status); return status; } @@ -909,7 +903,6 @@ struct nfs_client *nfs4_set_ds_client(struct nfs_server *mds_srv, .net = mds_clp->cl_net, .timeparms = &ds_timeout, }; - struct nfs_client *clp; char buf[INET6_ADDRSTRLEN + 1]; if (rpc_ntop(ds_addr, buf, sizeof(buf)) <= 0) @@ -925,10 +918,7 @@ struct nfs_client *nfs4_set_ds_client(struct nfs_server *mds_srv, * (section 13.1 RFC 5661). */ nfs_init_timeout_values(&ds_timeout, ds_proto, ds_timeo, ds_retrans); - clp = nfs_get_client(&cl_init); - - dprintk("<-- %s %p\n", __func__, clp); - return clp; + return nfs_get_client(&cl_init); } EXPORT_SYMBOL_GPL(nfs4_set_ds_client); @@ -1082,8 +1072,6 @@ struct nfs_server *nfs4_create_server(struct nfs_mount_info *mount_info, bool auth_probe; int error; - dprintk("--> nfs4_create_server()\n"); - server = nfs_alloc_server(); if (!server) return ERR_PTR(-ENOMEM); @@ -1099,12 +1087,10 @@ struct nfs_server *nfs4_create_server(struct nfs_mount_info *mount_info, if (error < 0) goto error; - dprintk("<-- nfs4_create_server() = %p\n", server); return server; error: nfs_free_server(server); - dprintk("<-- nfs4_create_server() = error %d\n", error); return ERR_PTR(error); } @@ -1119,8 +1105,6 @@ struct nfs_server *nfs4_create_referral_server(struct nfs_clone_mount *data, bool auth_probe; int error; - dprintk("--> nfs4_create_referral_server()\n"); - server = nfs_alloc_server(); if (!server) return ERR_PTR(-ENOMEM); @@ -1154,12 +1138,10 @@ struct nfs_server *nfs4_create_referral_server(struct nfs_clone_mount *data, if (error < 0) goto error; - dprintk("<-- nfs_create_referral_server() = %p\n", server); return server; error: nfs_free_server(server); - dprintk("<-- nfs4_create_referral_server() = error %d\n", error); return ERR_PTR(error); } @@ -1219,31 +1201,16 @@ int nfs4_update_server(struct nfs_server *server, const char *hostname, struct sockaddr *localaddr = (struct sockaddr *)&address; int error; - dprintk("--> %s: move FSID %llx:%llx to \"%s\")\n", __func__, - (unsigned long long)server->fsid.major, - (unsigned long long)server->fsid.minor, - hostname); - error = rpc_switch_client_transport(clnt, &xargs, clnt->cl_timeout); - if (error != 0) { - dprintk("<-- %s(): rpc_switch_client_transport returned %d\n", - __func__, error); - goto out; - } + if (error != 0) + return error; error = rpc_localaddr(clnt, localaddr, sizeof(address)); - if (error != 0) { - dprintk("<-- %s(): rpc_localaddr returned %d\n", - __func__, error); - goto out; - } + if (error != 0) + return error; - error = -EAFNOSUPPORT; - if (rpc_ntop(localaddr, buf, sizeof(buf)) == 0) { - dprintk("<-- %s(): rpc_ntop returned %d\n", - __func__, error); - goto out; - } + if (rpc_ntop(localaddr, buf, sizeof(buf)) == 0) + return -EAFNOSUPPORT; nfs_server_remove_lists(server); error = nfs4_set_client(server, hostname, sap, salen, buf, @@ -1252,21 +1219,12 @@ int nfs4_update_server(struct nfs_server *server, const char *hostname, nfs_put_client(clp); if (error != 0) { nfs_server_insert_lists(server); - dprintk("<-- %s(): nfs4_set_client returned %d\n", - __func__, error); - goto out; + return error; } if (server->nfs_client->cl_hostname == NULL) server->nfs_client->cl_hostname = kstrdup(hostname, GFP_KERNEL); nfs_server_insert_lists(server); - error = nfs_probe_destination(server); - if (error < 0) - goto out; - - dprintk("<-- %s() succeeded\n", __func__); - -out: - return error; + return nfs_probe_destination(server); }