ceph: fix double unlock in handle_cap_export()
authorWu Bo <wubo40@huawei.com>
Thu, 30 Apr 2020 06:12:49 +0000 (14:12 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 4 May 2020 17:14:23 +0000 (19:14 +0200)
commit4d8e28ff3106b093d98bfd2eceb9b430c70a8758
treee892c8e0b5ec7a78997cf977451f56f22527dbce
parent7d8976afad18d4548ee472e526b126ab74012807
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>
fs/ceph/caps.c