Skip to content

Commit

Permalink
Merge pull request #790 from robertbaldyga/v22.3.2-fix-ocf_alock_wait…
Browse files Browse the repository at this point in the history
…list

[v22.3.2] Fix wrong order call to ocf_alock_waitlist_remove_entry()
  • Loading branch information
robertbaldyga committed Mar 22, 2024
2 parents 082c0a8 + d72f264 commit 057d18f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/concurrency/ocf_cache_line_concurrency.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* Copyright(c) 2012-2022 Intel Corporation
* Copyright(c) 2022-2024 Huawei Technologies
* SPDX-License-Identifier: BSD-3-Clause
*/

Expand Down Expand Up @@ -135,7 +136,7 @@ static int ocf_cl_lock_line_slow(struct ocf_alock *alock,
continue;

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;
Expand Down
3 changes: 2 additions & 1 deletion src/concurrency/ocf_mio_concurrency.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* Copyright(c) 2021-2022 Intel Corporation
* Copyright(c) 2022-2024 Huawei Technologies
* SPDX-License-Identifier: BSD-3-Clause
*/

Expand Down Expand Up @@ -92,7 +93,7 @@ static int ocf_mio_lock_slow(struct ocf_alock *alock,
err:
for (; i >= 0; 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;
Expand Down
3 changes: 2 additions & 1 deletion src/concurrency/ocf_pio_concurrency.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* Copyright(c) 2021-2022 Intel Corporation
* Copyright(c) 2022-2024 Huawei Technologies
* SPDX-License-Identifier: BSD-3-Clause
*/

Expand Down Expand Up @@ -130,7 +131,7 @@ static int ocf_pio_lock_slow(struct ocf_alock *alock,
if (unlikely(entry == OUT_OF_RANGE))
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;
Expand Down

0 comments on commit 057d18f

Please sign in to comment.