]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
nfsd: fix initial getattr on write delegation
authorJeff Layton <jlayton@kernel.org>
Mon, 9 Sep 2024 14:40:53 +0000 (10:40 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Oct 2024 14:33:14 +0000 (16:33 +0200)
commit3a1bb47f24106a7b0b044839114c5f900ae84798
treeca77ad00be8f47c8e9a601f1a583fcdbe598fec2
parent3939b13fcbb951febad551f26d9327e393cb7bb6
nfsd: fix initial getattr on write delegation

[ Upstream commit bf92e5008b17f935a6de8b708551e02c2294121c ]

At this point in compound processing, currentfh refers to the parent of
the file, not the file itself. Get the correct dentry from the delegation
stateid instead.

Fixes: c5967721e106 ("NFSD: handle GETATTR conflict with write delegation")
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfsd/nfs4state.c