linux/fs/nfsd
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
..
acl.h NFSD: add posix ACLs to struct nfsd_attrs 2022-08-04 10:28:03 -04:00
auth.c nfsd: avoid pointless cred reference count bump 2024-12-02 11:25:14 +01:00
auth.h nfsd: Pass 'cred' instead of 'rqstp' to some functions. 2024-09-20 19:31:03 -04:00
blocklayout.c NFSD: Do the grace period check in ->proc_layoutget 2025-10-01 15:54:01 -04:00
blocklayoutxdr.c NFSD: Implement large extent array support in pNFS 2025-09-21 19:24:50 -04:00
blocklayoutxdr.h NFSD: Implement large extent array support in pNFS 2025-09-21 19:24:50 -04:00
cache.h nfsd: don't allocate the versions array. 2024-09-20 19:29:23 -04:00
current_stateid.h
debugfs.c NFSD: Add io_cache_{read,write} controls to debugfs 2025-10-01 15:54:01 -04:00
export.c NFSD 6.18 Release Notes 2025-10-06 13:22:21 -07:00
export.h NFSD 6.18 Release Notes 2025-10-06 13:22:21 -07:00
filecache.c NFSD 6.18 Release Notes 2025-10-06 13:22:21 -07:00
filecache.h NFSD 6.18 Release Notes 2025-10-06 13:22:21 -07:00
flexfilelayout.c NFSD: Do the grace period check in ->proc_layoutget 2025-10-01 15:54:01 -04:00
flexfilelayoutxdr.c NFSD: Rework encoding and decoding of nfsd4_deviceid 2025-09-21 19:24:50 -04:00
flexfilelayoutxdr.h NFSD: Make @gdev parameter of ->encode_getdeviceinfo a const pointer 2023-10-16 12:44:29 -04:00
idmap.h
Kconfig nfsd: Don't force CRYPTO_LIB_SHA256 to be built-in 2025-09-21 19:24:50 -04:00
localio.c NFSD 6.18 Release Notes 2025-10-06 13:22:21 -07:00
lockd.c nfsd: discard nfserr_dropit 2025-10-01 15:54:01 -04:00
Makefile NFSD: Add /sys/kernel/debug/nfsd 2025-05-11 19:48:23 -04:00
netlink.c nfsd: new netlink ops to get/set server pool_mode 2024-07-08 14:10:05 -04:00
netlink.h nfsd: new netlink ops to get/set server pool_mode 2024-07-08 14:10:05 -04:00
netns.h NFS Client Updates for Linux 6.14 2025-01-28 14:23:46 -08:00
nfs2acl.c nfsd: clear acl_access/acl_default after releasing them 2025-02-02 11:31:45 -05:00
nfs3acl.c nfsd: clear acl_access/acl_default after releasing them 2025-02-02 11:31:45 -05:00
nfs3proc.c VFS: change vfs_mkdir() to unlock on failure. 2025-11-14 13:15:58 +01:00
nfs3xdr.c nfsd: Use lookup_one() rather than lookup_one_len() 2025-04-07 09:25:32 +02:00
nfs4acl.c NFSD: Remove unnecessary posix_acl_entry pointer initialization 2024-11-11 13:41:58 -05:00
nfs4callback.c NFSD: Avoid corruption of a referring call list 2025-06-12 20:37:32 -04:00
nfs4idmap.c nfsd: call cache_put if xdr_reserve_space returns NULL 2024-09-20 19:31:03 -04:00
nfs4layouts.c NFSD: Rework encoding and decoding of nfsd4_deviceid 2025-09-21 19:24:50 -04:00
nfs4proc.c VFS: change vfs_mkdir() to unlock on failure. 2025-11-14 13:15:58 +01:00
nfs4recover.c VFS: change vfs_mkdir() to unlock on failure. 2025-11-14 13:15:58 +01:00
nfs4state.c nfsd: freeze c/mtime updates with outstanding WRITE_ATTRS delegation 2025-09-21 19:24:50 -04:00
nfs4xdr.c nfsd: use ATTR_CTIME_SET for delegated ctime updates 2025-09-21 19:24:50 -04:00
nfs4xdr_gen.c nfsd: rename NFS4_SHARE_WANT_* constants to OPEN4_SHARE_ACCESS_WANT_* 2025-01-21 15:30:01 -05:00
nfs4xdr_gen.h nfsd: rename NFS4_SHARE_WANT_* constants to OPEN4_SHARE_ACCESS_WANT_* 2025-01-21 15:30:01 -05:00
nfscache.c NFSD: Reduce DRC bucket size 2025-09-21 19:24:50 -04:00
nfsctl.c NFS Client Updates for Linux 6.18 2025-10-03 14:20:40 -07:00
nfsd.h nfsd: discard nfserr_dropit 2025-10-01 15:54:01 -04:00
nfsfh.c NFSD 6.18 Release Notes 2025-10-06 13:22:21 -07:00
nfsfh.h NFSD: Move the fh_getattr() helper 2025-09-21 19:24:50 -04:00
nfsproc.c VFS: change vfs_mkdir() to unlock on failure. 2025-11-14 13:15:58 +01:00
nfssvc.c SUNRPC: Move the svc_rpcb_cleanup() call sites 2025-09-23 13:28:19 -04:00
nfsxdr.c NFSD: Remove NFSSVC_MAXBLKSIZE_V2 macro 2025-05-15 16:16:28 -04:00
pnfs.h NFSD: Do the grace period check in ->proc_layoutget 2025-10-01 15:54:01 -04:00
state.h nfsd: Eliminate an allocation in nfs4_make_rec_clidname() 2025-09-21 19:24:50 -04:00
stats.c nfsd: don't ignore the return code of svc_proc_register() 2025-03-10 09:10:59 -04:00
stats.h nfsd: don't ignore the return code of svc_proc_register() 2025-03-10 09:10:59 -04:00
trace.c NFSD: Add SPDX header for fs/nfsd/trace.c 2020-11-30 13:00:24 -05:00
trace.h NFSD: filecache: add STATX_DIOALIGN and STATX_DIO_READ_ALIGN support 2025-09-30 16:10:05 -04:00
vfs.c VFS: change vfs_mkdir() to unlock on failure. 2025-11-14 13:15:58 +01:00
vfs.h NFSD: filecache: add STATX_DIOALIGN and STATX_DIO_READ_ALIGN support 2025-09-30 16:10:05 -04:00
xdr.h NFSD: prevent underflow in nfssvc_decode_writeargs() 2022-03-15 09:35:56 -04:00
xdr3.h nfsd: Fix NFSv3 atomicity bugs in nfsd_setattr() 2024-03-01 09:12:33 -05:00
xdr4.h NFSD: Implement large extent array support in pNFS 2025-09-21 19:24:50 -04:00
xdr4cb.h NFSD: Implement CB_SEQUENCE referring call lists 2025-05-11 19:48:20 -04:00