aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
authorMike Rapoport (Microsoft) <rppt@kernel.org>2026-05-23 20:54:23 +0300
committerJan Kara <jack@suse.cz>2026-05-25 18:17:27 +0200
commit9ddaf06cb08b4ea0eec8b9307d5d822fbb111461 (patch)
tree51249d513796107bcd6fc6d25392615d7b764df6 /fs
parent6d06b04c2b8dc0e02920336c9eb4312585fb1492 (diff)
downloadlinux-next-history-9ddaf06cb08b4ea0eec8b9307d5d822fbb111461.tar.gz
isofs: replace __get_free_page() with kmalloc()
isofs_readdir() allocates a temporary buffer with __get_free_page(). kmalloc() is a better API for such use and it also provides better scalability and more debugging possibilities. Replace use of __get_free_page() with kmalloc(). Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org> Link: https://patch.msgid.link/20260523-b4-fs-v1-11-275e36a83f0e@kernel.org Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs')
-rw-r--r--fs/isofs/dir.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/isofs/dir.c b/fs/isofs/dir.c
index 2fd9948d606e9..6d220eab531e5 100644
--- a/fs/isofs/dir.c
+++ b/fs/isofs/dir.c
@@ -13,6 +13,7 @@
*/
#include <linux/gfp.h>
#include <linux/filelock.h>
+#include <linux/slab.h>
#include "isofs.h"
int isofs_name_translate(struct iso_directory_record *de, char *new, struct inode *inode)
@@ -255,7 +256,7 @@ static int isofs_readdir(struct file *file, struct dir_context *ctx)
struct iso_directory_record *tmpde;
struct inode *inode = file_inode(file);
- tmpname = (char *)__get_free_page(GFP_KERNEL);
+ tmpname = kmalloc(PAGE_SIZE, GFP_KERNEL);
if (tmpname == NULL)
return -ENOMEM;
@@ -263,7 +264,7 @@ static int isofs_readdir(struct file *file, struct dir_context *ctx)
result = do_isofs_readdir(inode, file, ctx, tmpname, tmpde);
- free_page((unsigned long) tmpname);
+ kfree(tmpname);
return result;
}