linux/ipc
NeilBrown fe497f0759
VFS: change vfs_mkdir() to unlock on failure.
vfs_mkdir() already drops the reference to the dentry on failure but it
leaves the parent locked.
This complicates end_creating() which needs to unlock the parent even
though the dentry is no longer available.

If we change vfs_mkdir() to unlock on failure as well as releasing the
dentry, we can remove the "parent" arg from end_creating() and simplify
the rules for calling it.

Note that cachefiles_get_directory() can choose to substitute an error
instead of actually calling vfs_mkdir(), for fault injection.  In that
case it needs to call end_creating(), just as vfs_mkdir() now does on
error.

ovl_create_real() will now unlock on error.  So the conditional
end_creating() after the call is removed, and end_creating() is called
internally on error.

Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Tested-by: syzbot@syzkaller.appspotmail.com
Signed-off-by: NeilBrown <neil@brown.name>
Link: https://patch.msgid.link/20251113002050.676694-15-neilb@ownmail.net
Signed-off-by: Christian Brauner <brauner@kernel.org>
2025-11-14 13:15:58 +01:00
..
compat.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ipc_sysctl.c treewide: const qualify ctl_tables where applicable 2025-01-28 13:48:37 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mq_sysctl.c treewide: const qualify ctl_tables where applicable 2025-01-28 13:48:37 +01:00
mqueue.c VFS: change vfs_mkdir() to unlock on failure. 2025-11-14 13:15:58 +01:00
msg.c ipc/msg: replace one-element array with flexible array member 2024-11-05 17:12:28 -08:00
msgutil.c ns: move ns type into struct ns_common 2025-09-25 09:23:54 +02:00
namespace.c namespace-6.18-rc1 2025-09-29 11:20:29 -07:00
sem.c copy_process: pass clone_flags as u64 across calltree 2025-09-01 15:31:34 +02:00
shm.c ipc: support ns lookup 2025-09-19 14:26:15 +02:00
syscall.c y2038: remove CONFIG_64BIT_TIME 2019-11-15 14:38:27 +01:00
util.c ipc/util.c: complete the kernel-doc function descriptions 2025-01-24 22:47:27 -08:00
util.h sched.h: move pid helpers to pid.h 2023-12-20 19:26:31 -05:00