]> git.baikalelectronics.ru Git - kernel.git/commit
NFSv4.1: fix zero value filehandle in post open getattr
authorOlga Kornievskaia <kolga@netapp.com>
Thu, 13 Jul 2023 19:54:16 +0000 (15:54 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Oct 2023 12:56:56 +0000 (14:56 +0200)
commit3608be186ae5197bb5b65c92e6eac88a0d37ddce
tree02ea6dab27b596d14e31984c10e5e98ade67e05c
parente9f05ae6f63624fa95afdd7797610ec22d788d99
NFSv4.1: fix zero value filehandle in post open getattr

[ Upstream commit 4506f23e117161a20104c8fa04f33e1ca63c26af ]

Currently, if the OPEN compound experiencing an error and needs to
get the file attributes separately, it will send a stand alone
GETATTR but it would use the filehandle from the results of
the OPEN compound. In case of the CLAIM_FH OPEN, nfs_openres's fh
is zero value. That generate a GETATTR that's sent with a zero
value filehandle, and results in the server returning an error.

Instead, for the CLAIM_FH OPEN, take the filehandle that was used
in the PUTFH of the OPEN compound.

Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
Reviewed-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/nfs4proc.c