From patchwork Tue Jan 17 20:32:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schumaker, Anna" X-Patchwork-Id: 9521863 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 716F56043D for ; Tue, 17 Jan 2017 20:34:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 630FF285BC for ; Tue, 17 Jan 2017 20:34:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 54A21285C0; Tue, 17 Jan 2017 20:34: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 16A80285C0 for ; Tue, 17 Jan 2017 20:34:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751071AbdAQUeH (ORCPT ); Tue, 17 Jan 2017 15:34:07 -0500 Received: from mx143.netapp.com ([216.240.21.24]:15659 "EHLO mx143.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751179AbdAQUcw (ORCPT ); Tue, 17 Jan 2017 15:32:52 -0500 X-IronPort-AV: E=Sophos;i="5.33,246,1477983600"; d="scan'208";a="170180026" Received: from hioexcmbx06-prd.hq.netapp.com ([10.122.105.39]) by mx143-out.netapp.com with ESMTP; 17 Jan 2017 12:26:58 -0800 Received: from VMWEXCCAS04-PRD.hq.netapp.com (10.122.105.20) by hioexcmbx06-prd.hq.netapp.com (10.122.105.39) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Tue, 17 Jan 2017 12:32:28 -0800 Received: from NAM02-BL2-obe.outbound.protection.outlook.com (10.120.60.153) by VMWEXCCAS04-PRD.hq.netapp.com (10.122.105.20) with Microsoft SMTP Server (TLS) id 15.0.1210.3 via Frontend Transport; Tue, 17 Jan 2017 12:32:28 -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=dmkli/9xTOkHNHvhWuwnYA7Kbj0CWCnXJQoaDFZaYZ8=; b=pXRGinmlXu81Ya6jCQFKcyz4kAA0JYg4VEf4DqpBWsd9IeldfyZA6Pj1wFYPM4Uzqhh0IP0wxhB5YEsk7SlxOxvaNstJfIQN2jVvZpiNjyKbyI9unItOCcxHRFMFdRXTFdI+PNnRdP8Lazf7uq5YSR0w+zaFKpNmkqDhFP/1IBg= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Anna.Schumaker@netapp.com; Received: from gouda.nowheycreamery.com.nowheycreamery.com (68.40.188.1) by SN1PR0601MB1646.namprd06.prod.outlook.com (10.163.203.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.845.12; Tue, 17 Jan 2017 20:32:27 +0000 From: To: Subject: [PATCH v2 07/10] NFS: Remove unnecessary goto in nfs4_lookup_root_sec() Date: Tue, 17 Jan 2017 15:32:02 -0500 Message-ID: <20170117203205.29033-8-Anna.Schumaker@Netapp.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170117203205.29033-1-Anna.Schumaker@Netapp.com> References: <20170117203205.29033-1-Anna.Schumaker@Netapp.com> MIME-Version: 1.0 X-Originating-IP: [68.40.188.1] X-ClientProxiedBy: MWHPR09CA0042.namprd09.prod.outlook.com (10.173.46.156) To SN1PR0601MB1646.namprd06.prod.outlook.com (10.163.203.140) X-MS-Office365-Filtering-Correlation-Id: f32e32ce-7b5d-4e9b-622d-08d43f17f401 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:SN1PR0601MB1646; X-Microsoft-Exchange-Diagnostics: 1; SN1PR0601MB1646; 3:Ozuzw6InA1UcVgl5l6lPAGxr98ZAvkNZ0vYPbvv0Vqnu08H+mBSFcxkYTckAJs+eKk+C4aY+P74NvmnY1M/QUFcBPoGCoHNYULJnMit5SHJzCKaTLTQ6tuFj3F98BPsjuGuKVNUIbXOABcbtL7Za0pwYA8WkPoaO2pHmHRVwicYEhygR4ZpKiM1mBNlMcqpDGMA+Xubx1o4XGcdHOIw+1CHBL+suxAfPhRJEqewei6FW7MwRUjD6Scm2tkRs9kSSVq7DBHF7MgOskARMldH5RQ==; 25:ZwLd9IvbwBCrAcOSXLyMBlUmBcJZI4wpoCvVuc2h/04OKcGpZY2/NI+9nTuN/spb6NiS83yGQr/a3MDjbWY1uZDIJ77kWI8M0diZ8tGnxZxu4rR2A6R61XZaYzkPRrfAXQbn6WrkFeG/9JqFW3br8EnZ0cDg0/bxdKpMk4CDkzzBPvyr4lGjZk8K759q32moAx+Qa7zzF/C6qKqzjpu9QOEni2rWc/MMl1R8kArlQiyntOkCGU8lxBoBnzeFr41LzvbyoeDoEfB/IKdoWJXCRZlipGOp9BVPrzf/Ssm4/cHMEjmKYLp4QAmNGQUw6Ao4W2tTM6tGCADlsQ9f9v4FgXQdYARi1KBm8ivv0/lvAw26tMEprg3XBLZ/oZkTrF90lyfB6GZyHPDMn1JkcvS4stflJjqtdaWPde65LSJQx0Lmuibphc049fLu7c9A7UmXyl4Xhd8V9t+an5yx4Mb+Fg== X-Microsoft-Exchange-Diagnostics: 1; SN1PR0601MB1646; 31:TOrvGwBVveV5Nw/MZlZXZ5miiOEXQp0msUrUPaI3IhpBNfA7Yk1uVEdm+ECmvHlU6vOyKND4ytD5pbDWIhr+NF2VMufeSEnLgjZlMf3cDD4Fjp+QxpTjVywfXuRNeF+wQDUfTuW3MmjyGOPGkN0zIiXPRs9RspD2JSC8cKkwynpdSAHhuqSwlFQQwweDQx7hiK9r1Q4mqT8o6+Wdy9dTKF7UH5+0EGm89fC5M11DjFQTHxYX9BV6mgEYIvIg5PMSncKGH+YXZlRvdyUU/V3kew==; 20:sDRvJV6pnzTVUOfKlz+wdaLQDh9+pxkdOL/ej/aVQkFMjP5FV3FKOE4DL5tN8aG0dK5/+6e5w/BF9tGKRd7T0LsBLzHf7jZmWEIy/aVnS2CL88kWGxVfQ0c/uf2gqGfAP2UzZT4qjXgncilDLSchIN/NR40KX8BHfMHO5ONHeM8Qxs9ZoR1KvRns+QcKOj4kGTe1ROVzym7n6IuJPRsWRG92OcPb8tpcm3ZdE/BpkbJ5GBG1BNLnvop8IALxp6pD3lRIWkgVqxDRHyHq2ELNvQv61Dq/XoTWRQo7u+LTjF006LQcmnqPKl1cFZud8/chKv3V7Ft/thkBjpoghtK7lGhLHnfBHiJDtIEa3y6auYM3Wog9fWWdLDclOhgRSQmtGta577CHQ0KHXxP58IdNmSJ2rdUtmxA+MBP6q5bvoEmAaNzZFPET4Z7cyrgP8kELVy33aUbNw/75WQUdQc6ps2x8hvrenNS2YoA0T/H9N7HY8ZQM+MIVi5lMDXfaMTqq 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)(10201501046)(3002001)(6055026)(6041248)(20161123564025)(20161123562025)(20161123555025)(20161123560025)(6072148); SRVR:SN1PR0601MB1646; BCL:0; PCL:0; RULEID:; SRVR:SN1PR0601MB1646; X-Microsoft-Exchange-Diagnostics: 1; SN1PR0601MB1646; 4:j2lnzfRv1jKd0SDHFcQ9L8bYFL/iky+zgJwBNuOfE731jg4LIwLFEg7r7rrzbdr5JpD9uS2EEJDCyvTT7KDCeWLsau8OXIXUlA+IP6yFry6ppYDPM+8OnRkfMUrBzY2H/lDEEFsjdxy4MridsBEm8yIbKHozGZXmT3qHeaTa98EALF/oPw1rxhjB2sbxd/7dssSDqGqFNFNEotWIx9nwNORpJoOJCnsaRQpb5cNkceawe7xgxuRmI0HrgNrVjjeeFOOxD6X6Qj6l6b497w7Mp2imdLRfW1dSrCblO78TOYbXsTAaHzcaBwuZJCaMU9fjzGcNRInI5KlUy4CPyQ+1NBFAcgfmgsWjtsw8/D1V6Sh08lSh/dX3TQM/fKnA7cG2L1e0mIvJyavJxw2jJLcVWaxjvOljTIUp/vPoGdWaL3RTDWhhDNxUy0CQJCq4PyQOiSJh7SCxRi6RPLfixKbovzJAYmORKHJPSVjunvVT7s8MsK2IfzbDXiOD50bkpcX8BCxJBTq939nNWGV6rlpV45B8ZID8grozrejmBSL/rO8UFM0DgwGgwvP5V2Oo0tnxkg5UPSE8cIU3fsLBT+hIvA== X-Forefront-PRVS: 01901B3451 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(39450400003)(189002)(199003)(50226002)(107886002)(81166006)(97736004)(8676002)(81156014)(6916009)(6666003)(305945005)(7736002)(92566002)(105586002)(36756003)(1076002)(53936002)(2351001)(68736007)(48376002)(6512007)(106356001)(42186005)(86362001)(50466002)(47776003)(110136003)(5660300001)(6116002)(189998001)(450100001)(2950100002)(6506006)(6486002)(76176999)(38730400001)(50986999)(2906002)(5003940100001)(3846002)(66066001)(101416001)(2876002)(25786008)(86152003)(15760500002); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR0601MB1646; H:gouda.nowheycreamery.com.nowheycreamery.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A: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; SN1PR0601MB1646; 23:wZGWJLHSMScwcXQ1dFw2L8QI+J8PYeYKVMcZLaq?= =?us-ascii?Q?bZFPKxlApZHCtaw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vCJJa1t5c= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN1PR0601MB1646; 7:dqQXJfRDxzDQ4yhuFCcIXYQ1IBFqCgnki2Rke+gww9BjF4m6xFewhjpUssElwbiAoh+UHypCI+yoyr4DUJSIn/YHRxfmSbSwnatQUEbw+GLJGLm/0dp1rpMM3WGwq3yEbd0wJxDVDfFTWubwA3DQre8btwK4Rw9l4Lx0K34wesW2hsqbJckfIiN4L8v2NYIgmMiVl4UNU266/8St9r2xX6QtMVq+t4GTqjxuyq2gd5TALaG5phQFSLSGWDSL36gOZpdyrwPsxT0sOabeRJFmoKlERic/bsAEHfjrhL1S4IRJFo1YTxYdHUkKEQ4Tc/yvqtYGX5K2mjvisv3p8YPbHvbEfbjwf2A/ZkBhjfyB4zGpuAyz4jSVhPeGlSWEJxX/1u+p37mVYOxF2tofYVVtbHLioLRh/l87ymQrDp5mjUe6z5G6c0aW7H6oGSdavlLLhhVc1xBRPD00rLhk7NsEoA== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jan 2017 20:32:27.3128 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR0601MB1646 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 Once again, it's easier and cleaner just to return the error directly. Signed-off-by: Anna Schumaker --- fs/nfs/nfs4proc.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index bde48f02bd28..67aa9cf5f569 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -3412,16 +3412,11 @@ static int nfs4_lookup_root_sec(struct nfs_server *server, struct nfs_fh *fhandl .pseudoflavor = flavor, }; struct rpc_auth *auth; - int ret; auth = rpcauth_create(&auth_args, server->client); - if (IS_ERR(auth)) { - ret = -EACCES; - goto out; - } - ret = nfs4_lookup_root(server, fhandle, info); -out: - return ret; + if (IS_ERR(auth)) + return -EACCES; + return nfs4_lookup_root(server, fhandle, info); } /*