1
0
Fork 0

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: Wu Bo <wubo40@huawei.com>
Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
alistair/sunxi64-5.7-dsi
Wu Bo 2020-04-30 14:12:49 +08:00 committed by Ilya Dryomov
parent 7d8976afad
commit 4d8e28ff31
1 changed files with 1 additions and 0 deletions

View File

@ -3746,6 +3746,7 @@ retry:
WARN_ON(1);
tsession = NULL;
target = -1;
mutex_lock(&session->s_mutex);
}
goto retry;