diff options
author | Kemeng Shi <shikemeng@huaweicloud.com> | 2023-03-03 20:21:10 +0300 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2023-04-06 08:13:11 +0300 |
commit | 285164b80175157c18a06425cf25591c9f942b1a (patch) | |
tree | 1e8f2c8d72701b8c8a8eb3608d1ec967e96c117b | |
parent | 139f46d3b5e69937025faa38cb0a3711b9808158 (diff) | |
download | linux-285164b80175157c18a06425cf25591c9f942b1a.tar.xz |
ext4: remove unnecessary e4b->bd_buddy_page check in ext4_mb_load_buddy_gfp
e4b->bd_buddy_page is only set if we initialize ext4_buddy successfully. So
e4b->bd_buddy_page is always NULL in error handle branch. Just remove the
dead check.
Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
Reviewed-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
Link: https://lore.kernel.org/r/20230303172120.3800725-11-shikemeng@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rw-r--r-- | fs/ext4/mballoc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 17cfe6c2b582..8d3d59876a4a 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -1555,8 +1555,7 @@ err: put_page(page); if (e4b->bd_bitmap_page) put_page(e4b->bd_bitmap_page); - if (e4b->bd_buddy_page) - put_page(e4b->bd_buddy_page); + e4b->bd_buddy = NULL; e4b->bd_bitmap = NULL; return ret; |