ceph: fix deadlock or deadcode of misusing dget()
authorXiubo Li <xiubli@redhat.com>
Fri, 17 Nov 2023 05:26:18 +0000 (13:26 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 15 Jan 2024 14:40:50 +0000 (15:40 +0100)
commitb493ad718b1f0357394d2cdecbf00a44a36fa085
tree2c6c9a25b8de2ff1cd7f67ff4de538438d6aff52
parentaaefabc4a5f7ae48682c4d2d5d10faaf95c08eb9
ceph: fix deadlock or deadcode of misusing dget()

The lock order is incorrect between denty and its parent, we should
always make sure that the parent get the lock first.

But since this deadcode is never used and the parent dir will always
be set from the callers, let's just remove it.

Link: https://lore.kernel.org/r/20231116081919.GZ1957730@ZenIV
Reported-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/caps.c