nfsd: don't provide pre/post-op attrs if fh_getattr fails
authorJeff Layton <jlayton@kernel.org>
Fri, 19 May 2023 11:17:23 +0000 (07:17 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Sun, 11 Jun 2023 20:37:46 +0000 (16:37 -0400)
commit518f375c15af724cd89a4ec888dea942bb27f77f
tree1850ba4ec288c614d9db3ce60ecc4c80762643c0
parentdf56b384de521236c261bf34856dd0d3ba772850
nfsd: don't provide pre/post-op attrs if fh_getattr fails

nfsd calls fh_getattr to get the latest inode attrs for pre/post-op
info. In the event that fh_getattr fails, it resorts to scraping cached
values out of the inode directly.

Since these attributes are optional, we can just skip providing them
altogether when this happens.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Neil Brown <neilb@suse.de>
fs/nfsd/nfsfh.c