nfsd: handle failure to collect pre/post-op attrs more sanely
authorJeff Layton <jlayton@kernel.org>
Fri, 21 Jul 2023 14:29:10 +0000 (10:29 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Tue, 29 Aug 2023 21:45:22 +0000 (17:45 -0400)
commita332018a91c419a9a475c41d827544c771986876
treec9b264d04b08c26571e3d091e9bc5b4978c7d6c6
parent5865bafa197a90ecadd086c2874948fa0c474943
nfsd: handle failure to collect pre/post-op attrs more sanely

Collecting pre_op_attrs can fail, in which case it's probably best to
fail the whole operation.

Change fh_fill_pre_attrs and fh_fill_both_attrs to return __be32, and
have the callers check the return code and abort the operation if it's
not nfs_ok.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/nfs3proc.c
fs/nfsd/nfs4proc.c
fs/nfsd/nfsfh.c
fs/nfsd/nfsfh.h
fs/nfsd/vfs.c