]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
nfsd4: don't query change attribute in v2/v3 case
authorJ. Bruce Fields <bfields@redhat.com>
Mon, 30 Nov 2020 22:46:17 +0000 (17:46 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Jun 2024 12:52:45 +0000 (14:52 +0200)
commitb720ceec88a75fc6ea171519c3d30854c57d0e41
tree11a0cb0dfcb9bab5848a0ae7bdaeb27aace3378a
parent796785a79b4aefecab31bada4e7bc46e25fd91aa
nfsd4: don't query change attribute in v2/v3 case

[ Upstream commit 942b20dc245590327ee0187c15c78174cd96dd52 ]

inode_query_iversion() has side effects, and there's no point calling it
when we're not even going to use it.

We check whether we're currently processing a v4 request by checking
fh_maxsize, which is arguably a little hacky; we could add a flag to
svc_fh instead.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfsd/nfs3xdr.c