commit | c858a0709f991171256db74f4329a1cb8e823764 | [log] [tgz] |
---|---|---|
author | Yan, Zheng <zyan@redhat.com> | Mon Aug 28 15:02:42 2017 +0800 |
committer | Ilya Dryomov <idryomov@gmail.com> | Wed Sep 06 19:56:52 2017 +0200 |
tree | 8851a31963e23e8e6126abe0f4ee68cbf3edea86 | |
parent | d37b1d9943d5138b9b2630b7b7082629a82a1386 [diff] [blame] |
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>
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 662ada4..5daf866 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c
@@ -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); }