Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp514501pxa; Thu, 27 Aug 2020 08:21:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwUPICFR/gzbwGp5PEeuHxXtBgA20ObKJW4wUjdhzBZxHX7XDLQ+OwSmJC53Y+b52Rp8Ok/ X-Received: by 2002:a05:6402:17b8:: with SMTP id j24mr20660538edy.105.1598541677682; Thu, 27 Aug 2020 08:21:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598541677; cv=none; d=google.com; s=arc-20160816; b=v2IuZNOFPLdEpn3GS16mAkRsnebGDMnrLm56oL3hiy5Np9d7xO7oAIouAGXlTSRsaD 1al5i8EtZjYaQeOvU58kC7glzIrj1kzEHTBzl9Jvp3bQYGPIVpPzr8nHBEY/Z0GGjVcl ySJjttPu++dc9opVZAZzP9V4Fbvl1uK1D1qfej+c/IJM1DwLmNJXeAHDN70bR/x2VX/a 5S0tnnYISN8ymZG+OPIWdvb/SvRybkv+5kzHYzlQRUjsqJslA7yQ5zq8gvkpVMlZmE+H ZjVanYMnqz0jFnTUtsrneanSbc9h9xCcccb4+Ci1xm3q6QcrLZdpLv+NdpGrKmmWUzHT 0KuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=z6/z4dguDMh+ABkWifThvX32BTWJHF5U97fIrS4wAJo=; b=YVjqNATi1nStu1KIw+c9xFu5vecP9hZeZTgdUzaXZvsgMyPDPb5VrRfOojpZWtiZo5 MtemLmgfaoHkwpd3XMUS30W8zQP4FR4kVyVbU7D4ojxT+BocgIKO25yw/aAw7UUmotmP j44lzQ2p3I8ohVi/YvTu+fOBp+xQUqimoZYCMrq1CZpn948mWovOjcNeRjzK3Py4IoCQ pIzgdtRBPn3Bn4/NKfVxM2Kexwqre29ueMrPYGhoV+MQILxCl++2vHbE1BvnxaPqU2Jh yagUHUN5WPfRfbQvpUbYzhQRgDat6E56A3IQNE3rcwfEhQC4BzvxgXkaw0e0EBxuqPA9 CqoQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i22si1543096eja.737.2020.08.27.08.20.55; Thu, 27 Aug 2020 08:21:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726262AbgH0PUC (ORCPT + 99 others); Thu, 27 Aug 2020 11:20:02 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:39954 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728480AbgH0PTk (ORCPT ); Thu, 27 Aug 2020 11:19:40 -0400 Received: by mail-lf1-f67.google.com with SMTP id j15so3132258lfg.7 for ; Thu, 27 Aug 2020 08:19:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=z6/z4dguDMh+ABkWifThvX32BTWJHF5U97fIrS4wAJo=; b=ZoPsX8AaXi+bLfG/pVGWaigErI95PMNuwzPuAeXdNbEn4sevrx+FLOt2ZF+9IJp6LM QH7HKoxUKdfJCwIyiRyedRdPzIrQb2w86MEmggjYO04WETIxuDNS4vytPNqXYYKc6OTS 1lPubIusJc5DAxzInOrR+TGU7bNXVRJ0RRSfKZcsY/bxFOLrrJvlXK+cWk+dCMY9117A iodg7MztE9yVN+oHtEShLlK7qdVI91vl5yE15ZXq+7d7RBOQB3nUTfOxdnxCOF14RozR rSEAYmG/BKZPU4/lpy5izt3lAybuLA5Exx9R/PZBjZvlgkY7akk2a3MwJJQWx/FlXwXT E07A== X-Gm-Message-State: AOAM5319IPQa7KOekFCaUqPu2CeCpKdN7asTdAMzBq0+xtx0fXTq8jc3 BY7hVCk8Bvag/Ax45ogg7ZqKDyvRYeM= X-Received: by 2002:ac2:5150:: with SMTP id q16mr10125211lfd.73.1598541578750; Thu, 27 Aug 2020 08:19:38 -0700 (PDT) Received: from localhost.localdomain ([213.87.147.111]) by smtp.googlemail.com with ESMTPSA id j16sm538092ljg.31.2020.08.27.08.19.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Aug 2020 08:19:38 -0700 (PDT) From: Denis Efremov To: Jan Kara Cc: Denis Efremov , linux-kernel@vger.kernel.org Subject: [PATCH] udf: Use kvzalloc() in udf_sb_alloc_bitmap() Date: Thu, 27 Aug 2020 18:19:23 +0300 Message-Id: <20200827151923.40067-1-efremov@linux.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use kvzalloc() in udf_sb_alloc_bitmap() instead of open-coding it. Signed-off-by: Denis Efremov --- I'm not sure about TODO comment, through. fs/udf/super.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/fs/udf/super.c b/fs/udf/super.c index 1c42f544096d..c7cd15219b7c 100644 --- a/fs/udf/super.c +++ b/fs/udf/super.c @@ -1013,10 +1013,7 @@ static struct udf_bitmap *udf_sb_alloc_bitmap(struct super_block *sb, u32 index) size = sizeof(struct udf_bitmap) + (sizeof(struct buffer_head *) * nr_groups); - if (size <= PAGE_SIZE) - bitmap = kzalloc(size, GFP_KERNEL); - else - bitmap = vzalloc(size); /* TODO: get rid of vzalloc */ + bitmap = kvzalloc(size, GFP_KERNEL); if (!bitmap) return NULL; -- 2.26.2