From c858a0709f991171256db74f4329a1cb8e823764 Mon Sep 17 00:00:00 2001 From: Yan, Zheng Date: Mon, 28 Aug 2017 15:02:42 +0800 Subject: ceph: fix NULL pointer dereference in ceph_flush_snaps() Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov --- fs/ceph/caps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/ceph') diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 662ada467c32..5daf86621871 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -1469,7 +1469,7 @@ out: if (psession) { *psession = session; - } else { + } else if (session) { mutex_unlock(&session->s_mutex); ceph_put_mds_session(session); } -- cgit v1.2.3