提交 c0bd50e2 编写于 作者: Y Yan, Zheng 提交者: Ilya Dryomov

ceph: fix null pointer dereference in send_mds_reconnect()

sb->s_root can be null when umounting
Signed-off-by: NYan, Zheng <zyan@redhat.com>
上级 32ec4397
......@@ -2892,7 +2892,8 @@ static void send_mds_reconnect(struct ceph_mds_client *mdsc,
spin_unlock(&session->s_cap_lock);
/* trim unused caps to reduce MDS's cache rejoin time */
shrink_dcache_parent(mdsc->fsc->sb->s_root);
if (mdsc->fsc->sb->s_root)
shrink_dcache_parent(mdsc->fsc->sb->s_root);
ceph_con_close(&session->s_con);
ceph_con_open(&session->s_con,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册