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>
*/
#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)
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;
result = do_isofs_readdir(inode, file, ctx, tmpname, tmpde);
- free_page((unsigned long) tmpname);
+ kfree(tmpname);
return result;
}