ceph: fix NULL pointer dereference in ceph_flush_snaps()

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:
Yan, Zheng 2017-08-28 15:02:42 +08:00 committed by Ilya Dryomov
parent d37b1d9943
commit c858a0709f

View file

@ -1469,7 +1469,7 @@ void ceph_flush_snaps(struct ceph_inode_info *ci,
if (psession) {
*psession = session;
} else {
} else if (session) {
mutex_unlock(&session->s_mutex);
ceph_put_mds_session(session);
}