OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
50a4952
)
ext4: remove redundant operation that set bh to NULL
author
Kaixu Xia
<kaixuxia@tencent.com>
Tue, 20 Oct 2020 11:41:09 +0000
(19:41 +0800)
committer
Theodore Ts'o
<tytso@mit.edu>
Thu, 3 Dec 2020 14:15:29 +0000
(09:15 -0500)
The out_fail branch path don't release the bh and the second bh is
valid only in the for statement, so we don't need to set them to NULL.
Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
Reviewed-by: zhangyi (F) <yi.zhang@huawei.com>
Link:
https://lore.kernel.org/r/1603194069-17557-1-git-send-email-kaixuxia@tencent.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/super.c
patch
|
blob
|
history
diff --git
a/fs/ext4/super.c
b/fs/ext4/super.c
index
9447204
..
40e7aeb
100644
(file)
--- a/
fs/ext4/super.c
+++ b/
fs/ext4/super.c
@@
-4074,7
+4074,6
@@
static int ext4_fill_super(struct super_block *sb, void *data, int silent)
if (IS_ERR(bh)) {
ext4_msg(sb, KERN_ERR, "unable to read superblock");
ret = PTR_ERR(bh);
- bh = NULL;
goto out_fail;
}
/*
@@
-4703,7
+4702,6
@@
static int ext4_fill_super(struct super_block *sb, void *data, int silent)
"can't read group descriptor %d", i);
db_count = i;
ret = PTR_ERR(bh);
- bh = NULL;
goto failed_mount2;
}
rcu_read_lock();