ceph: make ceph_msdc_build_path use ref-walk
authorJeff Layton <jlayton@kernel.org>
Wed, 5 Aug 2020 18:50:48 +0000 (14:50 -0400)
committerIlya Dryomov <idryomov@gmail.com>
Tue, 22 Aug 2023 07:01:48 +0000 (09:01 +0200)
commit4c793d4c58b7e57e1eb616e3d032df6b3789a4a3
tree9b5f56b8164ce25ecec56bc24ffdfdfa49b9790f
parentec9595c080c6f0ba3ebcfc3013eac8f38b868b78
ceph: make ceph_msdc_build_path use ref-walk

Encryption potentially requires allocation, at which point we'll need to
be in a non-atomic context. Convert ceph_msdc_build_path to take dentry
spinlocks and references instead of using rcu_read_lock to walk the
path.

This is slightly less efficient, and we may want to eventually allow
using RCU when the leaf dentry isn't encrypted.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
Reviewed-and-tested-by: Luís Henriques <lhenriques@suse.de>
Reviewed-by: Milind Changire <mchangir@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/mds_client.c