From patchwork Thu Apr 14 12:37:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 8835861 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4006CC0553 for ; Thu, 14 Apr 2016 12:37:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6ABE3201BB for ; Thu, 14 Apr 2016 12:37:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 960E220256 for ; Thu, 14 Apr 2016 12:37:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755193AbcDNMhT (ORCPT ); Thu, 14 Apr 2016 08:37:19 -0400 Received: from mail-qg0-f44.google.com ([209.85.192.44]:33207 "EHLO mail-qg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932093AbcDNMhQ (ORCPT ); Thu, 14 Apr 2016 08:37:16 -0400 Received: by mail-qg0-f44.google.com with SMTP id j35so61698444qge.0 for ; Thu, 14 Apr 2016 05:37:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=poochiereds-net.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=TFYcPVZGt5M8etpb1vi6nPet/Uv9wbv4NlVFm71X/AI=; b=v0JdI0tibbDUq3SEmrN9dFaVrsHm9pEHnrGVn7Uvj+yONq7REHATlPZxznuEEpLoIQ Rmsm+UfwEUr23vbI8BHxQo+jNWaYf0SuzIeRfNy/fGEOC2XmLkU6XOfAfAo1fgS2uXZy Te1b2coHWdUcGyO49L/6gnZBp3ZN2B1yCHN5Do+kvItOACuoEA9coaHBWeDpJMD+HOZ+ TawglyU7pcs5JUBejHP/T5r8oW11gqCNhk7osP1vq/sZTqEsGW6I0PlvLjNxZdlcJEtB xQEg5JNXqztdr+CBfwCXP/ka0IP0bWyOp+9oMxvOfkIboQ/V97LTYqNqUVNXq/8XZO28 LCjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=TFYcPVZGt5M8etpb1vi6nPet/Uv9wbv4NlVFm71X/AI=; b=iscgzmq7mbRVvXwSIrMrnubOrJBkMDHqkAWqHyeCHOw1PMsp9884qOPYZIyziA2Cb5 ai6lBQsh+7Oh+sfXopErES81W2OgCe3mMbyVvSEeb5Jb64CbO2mPlx0fdPHasoKzPkBi Lz6g5b0qgtfb5Oqwd//T2xW+VX067iUR2kCvOUt3cW8JEnLOb3DgepiyebI9Y+wjvBi6 FVLsKNJgiDjoPMKtPbHmafh+sGaOroRINMg7BYH/JBcN0qdf1CyAxgbGuaUT1q/0a0hE aOAdiSACKwIwZOW/kD3KTBN4S8RthojksgrNNX/NSdToEDRwiRvj21R+fVtwHkLegJ26 Sj7Q== X-Gm-Message-State: AOPr4FW4BHqtNZCFwbYszbC3/gslP0/FKUu4/h2gU2Ej7ZoXDhgao6lq19h/CqtOqA3suA== X-Received: by 10.140.239.66 with SMTP id k63mr18860939qhc.11.1460637435739; Thu, 14 Apr 2016 05:37:15 -0700 (PDT) Received: from tlielax.poochiereds.net ([2606:a000:1125:4074:3a60:77ff:fe93:a95d]) by smtp.googlemail.com with ESMTPSA id e11sm18022238qkb.39.2016.04.14.05.37.15 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 14 Apr 2016 05:37:15 -0700 (PDT) From: Jeff Layton X-Google-Original-From: Jeff Layton To: trond.myklebust@primarydata.com Cc: linux-nfs@vger.kernel.org Subject: [PATCH 5/8] nfs: don't call nfs4_ff_layout_prepare_ds from ff_layout_get_ds_cred Date: Thu, 14 Apr 2016 08:37:02 -0400 Message-Id: <1460637425-1580-6-git-send-email-jeff.layton@primarydata.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1460637425-1580-1-git-send-email-jeff.layton@primarydata.com> References: <1460637425-1580-1-git-send-email-jeff.layton@primarydata.com> Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP All the callers already call that function before calling into here, so it ends up being a no-op anyway. Signed-off-by: Jeff Layton --- fs/nfs/flexfilelayout/flexfilelayoutdev.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/fs/nfs/flexfilelayout/flexfilelayoutdev.c b/fs/nfs/flexfilelayout/flexfilelayoutdev.c index add0e5a70bd6..a0dbf94d15ae 100644 --- a/fs/nfs/flexfilelayout/flexfilelayoutdev.c +++ b/fs/nfs/flexfilelayout/flexfilelayoutdev.c @@ -433,16 +433,12 @@ ff_layout_get_ds_cred(struct pnfs_layout_segment *lseg, u32 ds_idx, struct rpc_cred *mdscred) { struct nfs4_ff_layout_mirror *mirror = FF_LAYOUT_COMP(lseg, ds_idx); - struct rpc_cred *cred = ERR_PTR(-EINVAL); - - if (!nfs4_ff_layout_prepare_ds(lseg, ds_idx, true)) - goto out; + struct rpc_cred *cred; if (mirror && mirror->cred) cred = mirror->cred; else cred = mdscred; -out: return cred; }