[Devel] [PATCH RHEL8 COMMIT] ploop: Use down_write() in ploop_set_suspended()
Konstantin Khorenko
khorenko at virtuozzo.com
Thu Jul 15 16:30:41 MSK 2021
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.vz8.5.55
------>
commit 21ccc0374265b386bac540cb1688a922501eecac
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date: Thu Jul 15 16:30:41 2021 +0300
ploop: Use down_write() in ploop_set_suspended()
Variable assignment definitely requires WRITE-taken rwsem.
Also, remove unused function.
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
drivers/md/dm-ploop-target.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/md/dm-ploop-target.c b/drivers/md/dm-ploop-target.c
index 472f5aed73e5..c0fa9b973ab9 100644
--- a/drivers/md/dm-ploop-target.c
+++ b/drivers/md/dm-ploop-target.c
@@ -457,9 +457,9 @@ static void ploop_set_suspended(struct dm_target *ti, bool suspended)
{
struct ploop *ploop = ti->private;
- down_read(&ploop->ctl_rwsem);
+ down_write(&ploop->ctl_rwsem);
ploop->suspended = suspended;
- up_read(&ploop->ctl_rwsem);
+ up_write(&ploop->ctl_rwsem);
}
static void ploop_presuspend(struct dm_target *ti)
@@ -502,9 +502,6 @@ static int ploop_preresume(struct dm_target *ti)
}
return ret;
}
-static void ploop_resume(struct dm_target *ti)
-{
-}
/*----------------------------------------------------------------*/
More information about the Devel
mailing list