projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c7f2baf
)
ext4: remove unnecessary goto in ext4_mb_mark_diskspace_used
author
Kemeng Shi
<shikemeng@huaweicloud.com>
Fri, 3 Mar 2023 17:21:17 +0000
(
01:21
+0800)
committer
Theodore Ts'o
<tytso@mit.edu>
Thu, 6 Apr 2023 05:13:12 +0000
(
01:13
-0400)
When ext4_read_block_bitmap fails, we can return PTR_ERR(bitmap_bh) to
remove unnecessary NULL check of bitmap_bh.
Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Link:
https://lore.kernel.org/r/20230303172120.3800725-18-shikemeng@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/mballoc.c
patch
|
blob
|
history
diff --git
a/fs/ext4/mballoc.c
b/fs/ext4/mballoc.c
index f7cff3b5d7405478fe530bcaca6cedcc17e1656d..4136e53341c33d6869bd3f166e8aae552c8d0fc7 100644
(file)
--- a/
fs/ext4/mballoc.c
+++ b/
fs/ext4/mballoc.c
@@
-3739,9
+3739,7
@@
ext4_mb_mark_diskspace_used(struct ext4_allocation_context *ac,
bitmap_bh = ext4_read_block_bitmap(sb, ac->ac_b_ex.fe_group);
if (IS_ERR(bitmap_bh)) {
- err = PTR_ERR(bitmap_bh);
- bitmap_bh = NULL;
- goto out_err;
+ return PTR_ERR(bitmap_bh);
}
BUFFER_TRACE(bitmap_bh, "getting write access");