summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorYan, Zheng <zyan@redhat.com>2015-04-07 10:51:08 +0300
committerIlya Dryomov <idryomov@gmail.com>2015-04-22 18:33:31 +0300
commitc0bd50e2eeddf139d8f61e709d7003210301e93a (patch)
treeabb39df3a25758ce80e0d6f19b821d208dcd640e /fs
parent32ec4397756d072873ee778cbf41b9f6a335b953 (diff)
downloadlinux-c0bd50e2eeddf139d8f61e709d7003210301e93a.tar.xz
ceph: fix null pointer dereference in send_mds_reconnect()
sb->s_root can be null when umounting Signed-off-by: Yan, Zheng <zyan@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/ceph/mds_client.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index fd5585b8d382..0a2eb32ffe43 100644
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph/mds_client.c
@@ -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,