[Devel] [PATCH RH9] push_backup: Take rwsem killable
Kirill Tkhai
ktkhai at virtuozzo.com
Tue Sep 28 16:10:11 MSK 2021
... to have possibility to kill process.
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
drivers/md/dm-push-backup.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/md/dm-push-backup.c b/drivers/md/dm-push-backup.c
index 75f080fe34cf..6d7b1859298a 100644
--- a/drivers/md/dm-push-backup.c
+++ b/drivers/md/dm-push-backup.c
@@ -578,9 +578,11 @@ static int pb_message(struct dm_target *ti, unsigned int argc, char **argv,
read = msg_wants_down_read(argv[0]);
if (read)
- down_read(&pb->ctl_rwsem);
+ ret = down_read_killable(&pb->ctl_rwsem);
else
- down_write(&pb->ctl_rwsem);
+ ret = down_write_killable(&pb->ctl_rwsem);
+ if (unlikely(ret))
+ goto out;
if (!strcmp(argv[0], "push_backup_start")) {
if (argc < 2 || argc > 3)
More information about the Devel
mailing list