]> git.baikalelectronics.ru Git - kernel.git/commit
ceph: fix ceph_mdsc_build_path to not stop on first component
authorJeff Layton <jlayton@kernel.org>
Thu, 9 May 2019 11:58:38 +0000 (07:58 -0400)
committerIlya Dryomov <idryomov@gmail.com>
Thu, 27 Jun 2019 16:27:36 +0000 (18:27 +0200)
commita5cbd856dda5ca224a260cf7a1fe16aa8d14f352
treef711353bce589ffce51abf46fae9e1213b92fe82
parenta3643cb88e5c6bc01d219dfab095666d67d43f00
ceph: fix ceph_mdsc_build_path to not stop on first component

When ceph_mdsc_build_path is handed a positive dentry, it will return a
zero-length path string with the base set to that dentry.  This is not
what we want.  Always include at least one path component in the string.

ceph_mdsc_build_path has behaved this way for a long time but it didn't
matter until recent d_name handling rework.

Fixes: 40f99c04e00a ("ceph: use ceph_mdsc_build_path instead of clone_dentry_name")
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/mds_client.c