mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 14:19:16 +00:00
ceph: fix double unlock in handle_cap_export()
[ Upstream commit 4d8e28ff31
]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
d4c0e42f14
commit
7b9e34e821
1 changed files with 1 additions and 0 deletions
|
@ -3632,6 +3632,7 @@ static void handle_cap_export(struct inode *inode, struct ceph_mds_caps *ex,
|
|||
WARN_ON(1);
|
||||
tsession = NULL;
|
||||
target = -1;
|
||||
mutex_lock(&session->s_mutex);
|
||||
}
|
||||
goto retry;
|
||||
|
||||
|
|
Loading…
Reference in a new issue