]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
client: do not use g_conf().get_val<>() in libcephfs 38467/head
authorXiubo Li <xiubli@redhat.com>
Thu, 12 Nov 2020 01:13:45 +0000 (09:13 +0800)
committerVicente Cheng <freeze.bilsted@gmail.com>
Mon, 7 Dec 2020 08:46:28 +0000 (08:46 +0000)
commitc6c99d2693925d8556638e291c87a7d305dcf7b4
tree3c7eabe4ffe0e6d6de8287603681d9499ee141d1
parent113c464360ba2b5e92399525bd74abacaafcabb2
client: do not use g_conf().get_val<>() in libcephfs

The g_conf() will try to dereference the "g_ceph_context" to get
the "_conf", but the "g_ceph_context" won't be set in none fuse
use case in libcephfs, so it will crash in when doing
g_conf().get_val<>.

Switch to use cct->_conf.get_val<> instead.

Fixes: https://tracker.ceph.com/issues/48206
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit a467274f1c4dcf357de48fb736d40f7488bc4d7c)
src/client/Client.cc
src/client/fuse_ll.cc