Skip to content

Commit

Permalink
ceph: fix null pointer dereference in send_mds_reconnect()
Browse files Browse the repository at this point in the history
sb->s_root can be null when umounting

Signed-off-by: Yan, Zheng <[email protected]>
  • Loading branch information
ukernel authored and idryomov committed Apr 22, 2015
1 parent 32ec439 commit c0bd50e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/ceph/mds_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit c0bd50e

Please sign in to comment.