nfsd: only fill out return pointer on success in nfsd4_lookup_stateid
authorJeff Layton <jlayton@kernel.org>
Mon, 26 Sep 2022 16:38:44 +0000 (12:38 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 26 Sep 2022 18:23:44 +0000 (14:23 -0400)
commit4d01416ab41540bb13ec4a39ac4e6c4aa5934bc9
tree29803f7035c97f1c8c8169d96baf8c6a99d774fb
parent019805fea91599b22dfa62ffb29c022f35abeb06
nfsd: only fill out return pointer on success in nfsd4_lookup_stateid

In the case of a revoked delegation, we still fill out the pointer even
when returning an error, which is bad form. Only overwrite the pointer
on success.

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