summaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@sandisk.com>2016-08-31 15:16:22 -0700
committerMike Snitzer <snitzer@redhat.com>2016-09-14 13:56:38 -0400
commite3fabdfdf70e2b340cff968fd1d13e4c624de926 (patch)
tree60cdbd9f7f563238dd31a541a6d96e009e2e8468 /drivers/md
parentb48633f83f22914073314d97d49da2a2e1d3b350 (diff)
downloadlinux-e3fabdfdf70e2b340cff968fd1d13e4c624de926.tar.bz2
dm: use signal_pending_state() in dm_wait_for_completion()
Use signal_pending_state() instead of open-coding it. This patch does not change any functionality but makes it possible to pass TASK_KILLABLE as the second argument of dm_wait_for_completion(). See also commit 16882c1e962b ("sched: fix TASK_WAKEKILL vs SIGKILL race"). Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>. Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 4aaffe05de94..6678cb2c2138 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -1954,8 +1954,7 @@ static int dm_wait_for_completion(struct mapped_device *md, long task_state)
if (!md_in_flight(md))
break;
- if (task_state == TASK_INTERRUPTIBLE &&
- signal_pending(current)) {
+ if (signal_pending_state(task_state, current)) {
r = -EINTR;
break;
}