... to have possibility to kill process.

Signed-off-by: Kirill Tkhai <ktk...@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)


_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to