[PATCH] squashfs: replace kmalloc_array with kmalloc_objs

Lalit Shankar Chowdhury posted 1 patch 1 week, 6 days ago
fs/squashfs/file.c        | 2 +-
fs/squashfs/file_direct.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
[PATCH] squashfs: replace kmalloc_array with kmalloc_objs
Posted by Lalit Shankar Chowdhury 1 week, 6 days ago
Replace the remaining kmalloc_array instances with kmalloc_objs.

Signed-off-by: Lalit Shankar Chowdhury <lalitshankarch@gmail.com>
---
 fs/squashfs/file.c        | 2 +-
 fs/squashfs/file_direct.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/squashfs/file.c b/fs/squashfs/file.c
index d83594ce91d2..8cfedc766256 100644
--- a/fs/squashfs/file.c
+++ b/fs/squashfs/file.c
@@ -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;
 
diff --git a/fs/squashfs/file_direct.c b/fs/squashfs/file_direct.c
index 2c3e809d6891..ca1af243f064 100644
--- a/fs/squashfs/file_direct.c
+++ b/fs/squashfs/file_direct.c
@@ -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;
 
-- 
2.53.0