Skip to content

Commit c858a07

Browse files
ukernelidryomov
authored andcommitted
ceph: fix NULL pointer dereference in ceph_flush_snaps()
Signed-off-by: "Yan, Zheng" <[email protected]> Signed-off-by: Ilya Dryomov <[email protected]>
1 parent d37b1d9 commit c858a07

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/ceph/caps.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1469,7 +1469,7 @@ void ceph_flush_snaps(struct ceph_inode_info *ci,
14691469

14701470
if (psession) {
14711471
*psession = session;
1472-
} else {
1472+
} else if (session) {
14731473
mutex_unlock(&session->s_mutex);
14741474
ceph_put_mds_session(session);
14751475
}

0 commit comments

Comments
 (0)