diff options
| author | Mike Rapoport (Microsoft) <rppt@kernel.org> | 2026-05-23 20:54:29 +0300 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2026-05-28 14:58:14 +0300 |
| commit | c1fe8d334f93ebdba07c8a28c07fbd619e673633 (patch) | |
| tree | 3f4e351a527cf8fd43ce86d58fa86a8a35dfc811 | |
| parent | 6ff17653e94d97735d426a4924df7be51fd63abd (diff) | |
| download | linux-c1fe8d334f93ebdba07c8a28c07fbd619e673633.tar.xz | |
bfs: replace get_zeroed_page() with kzalloc()
bfs_dump_imap() allocates temporary buffer with get_zeroed_page().
kmalloc() is a better API for such use and it also provides better
scalability and more debugging possibilities.
Replace use of get_zeroed_page() with kzalloc().
Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Link: https://patch.msgid.link/20260523-b4-fs-v1-17-275e36a83f0e@kernel.org
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
| -rw-r--r-- | fs/bfs/inode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bfs/inode.c b/fs/bfs/inode.c index 9c3e90390824..e41efdd35db9 100644 --- a/fs/bfs/inode.c +++ b/fs/bfs/inode.c @@ -311,7 +311,7 @@ void bfs_dump_imap(const char *prefix, struct super_block *s) { #ifdef DEBUG int i; - char *tmpbuf = (char *)get_zeroed_page(GFP_KERNEL); + char *tmpbuf = kzalloc(PAGE_SIZE, GFP_KERNEL); if (!tmpbuf) return; @@ -323,7 +323,7 @@ void bfs_dump_imap(const char *prefix, struct super_block *s) strcat(tmpbuf, "0"); } printf("%s: lasti=%08lx <%s>\n", prefix, BFS_SB(s)->si_lasti, tmpbuf); - free_page((unsigned long)tmpbuf); + kfree(tmpbuf); #endif } |
