Merge pull request #789 from robertbaldyga/fix-ocf_alock_waitlist

Fix wrong order call to ocf_alock_waitlist_remove_entry()
This commit is contained in:
Robert Baldyga 2024-03-22 10:33:46 +01:00 committed by GitHub
commit f39a57a974
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 3 deletions

View File

@ -1,5 +1,6 @@
/* /*
* Copyright(c) 2012-2022 Intel Corporation * Copyright(c) 2012-2022 Intel Corporation
* Copyright(c) 2022-2024 Huawei Technologies
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
@ -135,7 +136,7 @@ err:
continue; continue;
entry = ocf_cl_lock_line_get_entry(alock, req, i); entry = ocf_cl_lock_line_get_entry(alock, req, i);
ocf_alock_waitlist_remove_entry(alock, req, i, entry, rw); ocf_alock_waitlist_remove_entry(alock, req, entry, i, rw);
} }
return ret; return ret;

View File

@ -1,5 +1,6 @@
/* /*
* Copyright(c) 2021-2022 Intel Corporation * Copyright(c) 2021-2022 Intel Corporation
* Copyright(c) 2022-2024 Huawei Technologies
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
@ -92,7 +93,7 @@ static int ocf_mio_lock_slow(struct ocf_alock *alock,
err: err:
for (; i >= 0; i--) { for (; i >= 0; i--) {
entry = ocf_mio_lock_get_entry(alock, req, i); entry = ocf_mio_lock_get_entry(alock, req, i);
ocf_alock_waitlist_remove_entry(alock, req, i, entry, OCF_WRITE); ocf_alock_waitlist_remove_entry(alock, req, entry, i, OCF_WRITE);
} }
return ret; return ret;

View File

@ -1,5 +1,6 @@
/* /*
* Copyright(c) 2021-2022 Intel Corporation * Copyright(c) 2021-2022 Intel Corporation
* Copyright(c) 2022-2024 Huawei Technologies
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
@ -130,7 +131,7 @@ err:
if (unlikely(entry == OUT_OF_RANGE)) if (unlikely(entry == OUT_OF_RANGE))
continue; continue;
ocf_alock_waitlist_remove_entry(alock, req, i, entry, OCF_WRITE); ocf_alock_waitlist_remove_entry(alock, req, entry, i, OCF_WRITE);
} }
return ret; return ret;