[Devel] [PATCH RH8] dm-ploop: Add PERCPU_REF_ALLOW_REINIT for refcounter
Kirill Tkhai
ktkhai at virtuozzo.com
Fri Dec 4 19:32:41 MSK 2020
This is for RHEL8.4 rebase. Without the flag,
refcounter memory is freed early.
https://jira.sw.ru/browse/PSBM-123433
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
drivers/md/dm-ploop-target.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/md/dm-ploop-target.c b/drivers/md/dm-ploop-target.c
index 986617dc1eb8..591f583bc324 100644
--- a/drivers/md/dm-ploop-target.c
+++ b/drivers/md/dm-ploop-target.c
@@ -145,7 +145,7 @@ static int ploop_ctr(struct dm_target *ti, unsigned int argc, char **argv)
for (i = 0; i < 2; i++) {
release = i ? inflight_bios_ref_exit1 : inflight_bios_ref_exit0;
if (percpu_ref_init(&ploop->inflight_bios_ref[i], release,
- 0, GFP_KERNEL)) {
+ PERCPU_REF_ALLOW_REINIT, GFP_KERNEL)) {
ret = -ENOMEM;
ti->error = "could not alloc percpu_ref";
goto err;
More information about the Devel
mailing list