]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
VFS: tidy up do_unlinkat()
authorNeilBrown <neil@brown.name>
Thu, 13 Nov 2025 00:18:26 +0000 (11:18 +1100)
committerChristian Brauner <brauner@kernel.org>
Fri, 14 Nov 2025 12:15:56 +0000 (13:15 +0100)
commit3661a7887462b2352ef5199a04e79c3d3c11fff3
tree4fb6e686617ff63a91f01021bc330ab30a0e9b10
parent4037d966f034ba5da2872c413b2ec17eca867e68
VFS: tidy up do_unlinkat()

The simplification of locking in the previous patch opens up some room
for tidying up do_unlinkat()

- change all "exit" labels to describe what will happen at the label.
- always goto an exit label on an error - unwrap the "if (!IS_ERR())" branch.
- Move the "slashes" handing inline, but mark it as unlikely()
- simplify use of the "inode" variable - we no longer need to test for NULL.

Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: NeilBrown <neil@brown.name>
Link: https://patch.msgid.link/20251113002050.676694-4-neilb@ownmail.net
Tested-by: syzbot@syzkaller.appspotmail.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/namei.c