From patchwork Fri Jul 21 14:58:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 13322114 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 44E47EB64DC for ; Fri, 21 Jul 2023 14:58:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230508AbjGUO6O (ORCPT ); Fri, 21 Jul 2023 10:58:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230375AbjGUO6N (ORCPT ); Fri, 21 Jul 2023 10:58:13 -0400 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C77D134 for ; Fri, 21 Jul 2023 07:58:12 -0700 (PDT) Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-3fbc54cab6fso17150405e9.0 for ; Fri, 21 Jul 2023 07:58:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1689951491; x=1690556291; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=sNImucjaNLeCmsiuYLvYcRiNL6dxUcfBU2q2yYk+Sqk=; b=e0J75bMOF5TBrsKhmcdIjD5RHjDqWJ+etcFweO+mNetFuMTGRFmXpHU2FfBxTNljba UV4FJ+FPlT1OlJsum3IhHpioVjPlHbC6jCBLl6Te2I6Bqvcg8ph9DyEV5uqUZIDZhfdH ht9B4fn6qbXeoTIezjJexs1W+3DAci9qGobmvCBteaOHpoMPspZ3LOHfLduUiofuvdI5 IXdfXiIo/ScTlkDcD04pIYPDceXDMNxWgomZHHziDDU6WzRzpTc/xOXDN11TLT/Yw6HX x9XgkJ1LuG2T86QVmAVmAXKRHV/OIbV2ah4m8crEGAWBSIXUPyyZDYXmV5Wfi3FbU8GO HIhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689951491; x=1690556291; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=sNImucjaNLeCmsiuYLvYcRiNL6dxUcfBU2q2yYk+Sqk=; b=Mq5cuzLC46haPqhpuXcDyMAr02a8ZBljzuZA0l/gpya/TyneW25BB6ZYT1ekEmMaYc 9LU+uTkGyZSXNaqmCtU+hWYq4qzc+vrYtkhgSix6/Nzx2V0os82xKSpSU+TpPKyJSQN+ y+QF0D3f0LS8OmmMYo7USaKnLR1hpW7P7jH8YHb/eq4lY+bBpao6SMga/YMjzGKyswRc nXYAM3bR0+hfdiFEFerIRuvJA6hnwX5oshrRSzX3Mm9HaWc4K4OHsT+B218kKkV9QOiF 299RWEeKo+tkkuLhxPvm0uCIB60eJuGGHYNKJucE8sUGMv9Knu0gYI2ral//BBcJBld/ AQ6Q== X-Gm-Message-State: ABy/qLYHQhEboL3QrjeUBl47K4WQ9QdUGoXLVobcclb66LTWhE94tDT1 cXzg9vBdFmKTAu76zXSLs81gBw== X-Google-Smtp-Source: APBJJlGEkuj1I7We6C0/2twPAnua9yYsxAC+t+5a6WpR9gTNnNV22u9C2u5YnVXfaF6OB7t7l59Fjw== X-Received: by 2002:adf:d851:0:b0:315:8f4f:81b1 with SMTP id k17-20020adfd851000000b003158f4f81b1mr1568386wrl.50.1689951490773; Fri, 21 Jul 2023 07:58:10 -0700 (PDT) Received: from localhost ([102.36.222.112]) by smtp.gmail.com with ESMTPSA id o15-20020adfeacf000000b00313de682eb3sm4435634wrn.65.2023.07.21.07.58.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Jul 2023 07:58:09 -0700 (PDT) Date: Fri, 21 Jul 2023 17:58:05 +0300 From: Dan Carpenter To: Christoph Hellwig Cc: Trond Myklebust , Anna Schumaker , Jens Axboe , Jack Wang , Dave Chinner , Hannes Reinecke , Christian Brauner , linux-nfs@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] nfs/blocklayout: Use the passed in gfp flags Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email haha only kidding Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org This allocation should use the passed in GFP_ flags instead of GFP_KERNEL. All the callers that I reviewed passed GFP_KERNEL as the allocation flags so this might not affect runtime, but it's still worth cleaning up. Fixes: 5c83746a0cf2 ("pnfs/blocklayout: in-kernel GETDEVICEINFO XDR parsing") Signed-off-by: Dan Carpenter --- fs/nfs/blocklayout/dev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/nfs/blocklayout/dev.c b/fs/nfs/blocklayout/dev.c index 70f5563a8e81..65cbb5607a5f 100644 --- a/fs/nfs/blocklayout/dev.c +++ b/fs/nfs/blocklayout/dev.c @@ -404,7 +404,7 @@ bl_parse_concat(struct nfs_server *server, struct pnfs_block_dev *d, int ret, i; d->children = kcalloc(v->concat.volumes_count, - sizeof(struct pnfs_block_dev), GFP_KERNEL); + sizeof(struct pnfs_block_dev), gfp_mask); if (!d->children) return -ENOMEM; @@ -433,7 +433,7 @@ bl_parse_stripe(struct nfs_server *server, struct pnfs_block_dev *d, int ret, i; d->children = kcalloc(v->stripe.volumes_count, - sizeof(struct pnfs_block_dev), GFP_KERNEL); + sizeof(struct pnfs_block_dev), gfp_mask); if (!d->children) return -ENOMEM;