]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - fs/ceph/super.c
ceph: fix dentry leak when failing to init debugfs
authorChengguang Xu <cgxu519@icloud.com>
Fri, 9 Feb 2018 12:40:59 +0000 (20:40 +0800)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 27 Aug 2018 14:40:05 +0000 (16:40 +0200)
commitf3ff40c89110171e0044cbcbd705a4b9c5893edc
tree92cce2d1d413f573b5565ef9e9ea191e8e53afe8
parentc3be21bbf5032ba6a3d4187af7c37a60218cb6a2
ceph: fix dentry leak when failing to init debugfs

BugLink: http://bugs.launchpad.net/bugs/1786352
[ Upstream commit 18106734b512664a8541026519ce4b862498b6c3 ]

When failing from ceph_fs_debugfs_init() in ceph_real_mount(),
there is lack of dput of root_dentry and it causes slab errors,
so change the calling order of ceph_fs_debugfs_init() and
open_root_dentry() and do some cleanups to avoid this issue.

Signed-off-by: Chengguang Xu <cgxu519@icloud.com>
Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
fs/ceph/super.c