Skip to contentSkip to conversation

squashfs: replace kmalloc_array with kmalloc_objs

PATCH New Lalit Shankar Chowdhury 1 participant 1 message Sep 11 SquashFS file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 squashfs: replace kmalloc_array with kmalloc_objs

Replace the remaining kmalloc_array instances with kmalloc_objs.

---
 fs/squashfs/file.c        | 2 +-
 fs/squashfs/file_direct.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
fs/squashfs/file.c +1 -1
index d83594ce91d2..8cfedc766256 100644
@@ -588,7 +588,7 @@ static void squashfs_readahead(struct readahead_control *ractl)
 
 	readahead_expand(ractl, start, (len | mask) + 1);
 
-	pages = kmalloc_array(max_pages, sizeof(void *), GFP_KERNEL);
+	pages = kmalloc_objs(*pages, max_pages);
 	if (!pages)
 		return;
 
fs/squashfs/file_direct.c +1 -1
index 2c3e809d6891..ca1af243f064 100644
@@ -40,7 +40,7 @@ int squashfs_readpage_block(struct folio *folio, u64 block, int bsize,
 
 	pages = end_index - start_index + 1;
 
-	page = kmalloc_array(pages, sizeof(void *), GFP_KERNEL);
+	page = kmalloc_objs(*page, pages);
 	if (page == NULL)
 		return res;
 
Signature · 1 line
2.53.0