ceph: ensure d_name stability in ceph_dentry_hash()
authorJeff Layton <jlayton@kernel.org>
Wed, 17 Apr 2019 16:58:28 +0000 (12:58 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 May 2019 07:32:01 +0000 (09:32 +0200)
commita9adfd9439199bb957ff8e2349adebc434803bb4
tree85bd3991431ff389dfcbf51fd92f837942f64588
parentc9e5f60b6a6b679f27cb7d7ed8a26840ad56513c
ceph: ensure d_name stability in ceph_dentry_hash()

commit 76a495d666e5043ffc315695f8241f5e94a98849 upstream.

Take the d_lock here to ensure that d_name doesn't change.

Cc: stable@vger.kernel.org
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ceph/dir.c