ceph_wait_on_conflict_unlink(): grab reference before dropping ->d_lock
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 15 Sep 2023 01:55:29 +0000 (21:55 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Nov 2023 13:11:02 +0000 (14:11 +0100)
commit803cc77a3acc3821f2f34c5d07338c108305f019
tree97a84a6a9c158c9fb05416a110e866086f1b1f8b
parent9eab5008db6c98273acaa0e0dde0fdb25848217e
ceph_wait_on_conflict_unlink(): grab reference before dropping ->d_lock

[ Upstream commit dc32464a5fe4946fe1a4d8f8e29961dc411933c5 ]

Use of dget() after we'd dropped ->d_lock is too late - dentry might
be gone by that point.

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/ceph/mds_client.c