linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] udf: Use kvzalloc() in udf_sb_alloc_bitmap()
@ 2020-08-27 15:19 Denis Efremov
  2020-08-27 15:28 ` Denis Efremov
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Denis Efremov @ 2020-08-27 15:19 UTC (permalink / raw)
  To: Jan Kara; +Cc: Denis Efremov, linux-kernel

Use kvzalloc() in udf_sb_alloc_bitmap() instead of open-coding it.

Signed-off-by: Denis Efremov <efremov@linux.com>
---

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


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-08-28 10:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-27 15:19 [PATCH] udf: Use kvzalloc() in udf_sb_alloc_bitmap() Denis Efremov
2020-08-27 15:28 ` Denis Efremov
2020-08-27 15:49   ` Joe Perches
2020-08-27 21:25 ` [PATCH v2] " Denis Efremov
2020-08-27 22:09   ` Gustavo A. R. Silva
2020-08-27 22:07     ` Denis Efremov
2020-08-27 22:16 ` [PATCH v3] " Denis Efremov
2020-08-27 22:29   ` Gustavo A. R. Silva
2020-08-28 10:29     ` Jan Kara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).