]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
nfs: change mkdir inode_operation to return alternate dentry if needed.
authorNeilBrown <neilb@suse.de>
Thu, 27 Feb 2025 01:32:57 +0000 (12:32 +1100)
committerChristian Brauner <brauner@kernel.org>
Wed, 5 Mar 2025 10:52:50 +0000 (11:52 +0100)
commit8376583b84a1937196514dbe380917d61af29978
tree358757976050d7095bc4b61f41f8316cc79aa485
parentd701902c13dfc40b83b52e41155824c038ac19d2
nfs: change mkdir inode_operation to return alternate dentry if needed.

mkdir now allows a different dentry to be returned which is sometimes
relevant for nfs.

This patch changes the nfs_rpc_ops mkdir op to return a dentry, and
passes that back to the caller.

The mkdir nfs_rpc_op will return NULL if the original dentry should be
used.  This matches the mkdir inode_operation.

nfs4_do_create() is duplicated to nfs4_do_mkdir() which is changed to
handle the specifics of directories.  Consequently the current special
handling for directories is removed from nfs4_do_create()

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: NeilBrown <neilb@suse.de>
Link: https://lore.kernel.org/r/20250227013949.536172-6-neilb@suse.de
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/nfs/dir.c
fs/nfs/nfs3proc.c
fs/nfs/nfs4proc.c
fs/nfs/proc.c
include/linux/nfs_xdr.h