Skip to contentSkip to conversation

ext4: remove dead code in updating backup sb

PATCH Applied Tanmay Bhushan 3 participants 3 messages Dec 30, 2022 – Feb 19, 2023 ext4 file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ext4: remove dead code in updating backup sb

ext4_update_backup_sb checks for err having some value after unlocking buffer. But err has not been updated till that point in any code which will lead execution of the code in question.

---
 fs/ext4/ioctl.c | 3 ---
 1 file changed, 3 deletions(-)
fs/ext4/ioctl.c +0 -3
index 8067ccda34e4..2e8c34036313 100644
@@ -155,9 +155,6 @@ static int ext4_update_backup_sb(struct super_block *sb,
 	set_buffer_uptodate(bh);
 	unlock_buffer(bh);
 
-	if (err)
-		goto out_bh;
-
 	if (handle) {
 		err = ext4_handle_dirty_metadata(handle, NULL, bh);
 		if (err)
Signature · 1 line
2.34.1
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Tanmay Bhushan

ext4_update_backup_sb checks for err having some value after unlocking buffer. But err has not been updated till that point in any code which will lead execution of the code in question.

Looks good to me. Feel free to add:

Honza

Quoted 21 lines
---
 fs/ext4/ioctl.c | 3 ---
 1 file changed, 3 deletions(-)
fs/ext4/ioctl.c +0 -3
index 8067ccda34e4..2e8c34036313 100644
@@ -155,9 +155,6 @@ static int ext4_update_backup_sb(struct super_block *sb,
 	set_buffer_uptodate(bh);
 	unlock_buffer(bh);
 
-	if (err)
-		goto out_bh;
-
 	if (handle) {
 		err = ext4_handle_dirty_metadata(handle, NULL, bh);
 		if (err)
Signature · 1 line
2.34.1
Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR
maintainer Applied
#2 lore raw
In reply to Tanmay Bhushan
Quoted 6 lines · Tanmay Bhushan

ext4_update_backup_sb checks for err having some value after unlocking buffer. But err has not been updated till that point in any code which will lead execution of the code in question.

Applied, thanks!

[1/1] ext4: remove dead code in updating backup sb

      commit: 08abd0466ec9113908e674d042ec2a36dfc2875c

Best regards,

Signature · 1 line
Theodore Ts'o <[email protected]>