[Devel] [PATCH RHEL8 COMMIT] dm-ploop: Add PERCPU_REF_ALLOW_REINIT for refcounter
Konstantin Khorenko
khorenko at virtuozzo.com
Mon Dec 7 20:31:06 MSK 2020
The commit is pushed to "branch-rh8-4.18.0-240.1.1.vz8.5.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-240.1.1.el8
------>
commit b304f2465c4e01078d261734ed7c0f106d6928ae
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date: Fri Dec 4 19:32:41 2020 +0300
dm-ploop: Add PERCPU_REF_ALLOW_REINIT for refcounter
This is for RHEL8.4 rebase. Without the flag,
refcounter memory is freed early.
https://jira.sw.ru/browse/PSBM-123433
Fixes: 7264d1dd954a ("dm: Interpreter of ploop1 format (ploop driver)")
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