From 0c2d230adcf1de99b7e5377cf138e5a7fd4a31cb Mon Sep 17 00:00:00 2001 From: Amir Haroush Date: Sun, 14 Aug 2022 12:20:22 +0300 Subject: [PATCH] Fix wrong order call to ocf_alock_waitlist_remove_entry() Signed-off-by: Amir Haroush Signed-off-by: Robert Baldyga --- src/concurrency/ocf_cache_line_concurrency.c | 3 ++- src/concurrency/ocf_mio_concurrency.c | 3 ++- src/concurrency/ocf_pio_concurrency.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/concurrency/ocf_cache_line_concurrency.c b/src/concurrency/ocf_cache_line_concurrency.c index 1d07a45d..c802a0a4 100644 --- a/src/concurrency/ocf_cache_line_concurrency.c +++ b/src/concurrency/ocf_cache_line_concurrency.c @@ -1,5 +1,6 @@ /* * Copyright(c) 2012-2022 Intel Corporation + * Copyright(c) 2022-2024 Huawei Technologies * SPDX-License-Identifier: BSD-3-Clause */ @@ -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; diff --git a/src/concurrency/ocf_mio_concurrency.c b/src/concurrency/ocf_mio_concurrency.c index 255ac6ff..173d4c92 100644 --- a/src/concurrency/ocf_mio_concurrency.c +++ b/src/concurrency/ocf_mio_concurrency.c @@ -1,5 +1,6 @@ /* * Copyright(c) 2021-2022 Intel Corporation + * Copyright(c) 2022-2024 Huawei Technologies * SPDX-License-Identifier: BSD-3-Clause */ @@ -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; diff --git a/src/concurrency/ocf_pio_concurrency.c b/src/concurrency/ocf_pio_concurrency.c index cf6b40c4..2fdd5c2a 100644 --- a/src/concurrency/ocf_pio_concurrency.c +++ b/src/concurrency/ocf_pio_concurrency.c @@ -1,5 +1,6 @@ /* * Copyright(c) 2021-2022 Intel Corporation + * Copyright(c) 2022-2024 Huawei Technologies * SPDX-License-Identifier: BSD-3-Clause */ @@ -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;