* [PATCH] squashfs: replace kmalloc_array with kmalloc_objs
@ 2026-09-11 17:30 Lalit Shankar Chowdhury
0 siblings, 0 replies; only message in thread
From: Lalit Shankar Chowdhury @ 2026-09-11 17:30 UTC (permalink / raw)
To: Phillip Lougher, open list; +Cc: Lalit Shankar Chowdhury
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-11 17:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-11 17:30 [PATCH] squashfs: replace kmalloc_array with kmalloc_objs Lalit Shankar Chowdhury
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®