rpc_mkpipe_dentry(): saner calling conventions
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 20 Feb 2024 07:41:59 +0000 (02:41 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 3 Jul 2025 02:44:55 +0000 (22:44 -0400)
commit19a6314a997f6adde0c100ecf9224d1ab43c9603
treeea27bf6ccb9d501103eb63260a402277d14d821c
parentbccea4ed060f1f6476ac7a0649ffa73f77d6e94c
rpc_mkpipe_dentry(): saner calling conventions

Instead of returning a dentry or ERR_PTR(-E...), return 0 and store
dentry into pipe->dentry on success and return -E... on failure.

Callers are happier that way...

NOTE: dummy rpc_pipe is getting ->dentry set; we never access that,
since we
1) never call rpc_unlink() for it (dentry is taken out by
->kill_sb())
2) never call rpc_queue_upcall() for it (writing to that
sucker fails; no downcalls are ever submitted, so no replies are
going to arrive)
IOW, having that ->dentry set (and left dangling) is harmless,
if ugly; cleaner solution will take more massage.

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/nfs/blocklayout/rpc_pipefs.c
fs/nfs/nfs4idmap.c
fs/nfsd/nfs4recover.c
include/linux/sunrpc/rpc_pipe_fs.h
net/sunrpc/auth_gss/auth_gss.c
net/sunrpc/rpc_pipe.c