Commit 4d8e28ff authored by Wu Bo's avatar Wu Bo Committed by Ilya Dryomov
Browse files

ceph: fix double unlock in handle_cap_export()



If the ceph_mdsc_open_export_target_session() return fails, it will
do a "goto retry", but the session mutex has already been unlocked.
Re-lock the mutex in that case to ensure that we don't unlock it
twice.

Signed-off-by: default avatarWu Bo <wubo40@huawei.com>
Reviewed-by: default avatar"Yan, Zheng" <zyan@redhat.com>
Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
parent 7d8976af
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -3746,6 +3746,7 @@ retry:
		WARN_ON(1);
		tsession = NULL;
		target = -1;
		mutex_lock(&session->s_mutex);
	}
	goto retry;