linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ext4: remove branch to identical code ext4_init_new_dir()
@ 2025-08-12 16:53 Sergio Perez Gonzalez
  0 siblings, 0 replies; only message in thread
From: Sergio Perez Gonzalez @ 2025-08-12 16:53 UTC (permalink / raw)
  To: tytso, adilger.kernel; +Cc: Sergio Perez Gonzalez, linux-ext4, linux-kernel

It seems unnecessary to use a branch, in the event of
error, to the same target label that would execute on
success.

Signed-off-by: Sergio Perez Gonzalez <sperezglz@gmail.com>
---
 fs/ext4/namei.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index d83f91b62317..01f379f5fd04 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -2984,8 +2984,6 @@ int ext4_init_new_dir(handle_t *handle, struct inode *dir,
 		return PTR_ERR(dir_block);
 	de = (struct ext4_dir_entry_2 *)dir_block->b_data;
 	err = ext4_init_dirblock(handle, inode, dir_block, dir->i_ino, NULL, 0);
-	if (err)
-		goto out;
 out:
 	brelse(dir_block);
 	return err;
-- 
2.43.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2025-08-12 16:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-12 16:53 [PATCH] ext4: remove branch to identical code ext4_init_new_dir() Sergio Perez Gonzalez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).