Skip to content

Commit 1e1fd56

Browse files
author
Mikulas Patocka
committed
dm suspend: return -ERESTARTSYS instead of -EINTR
This commit changes device mapper, so that it returns -ERESTARTSYS instead of -EINTR when it is interrupted by a signal (so that the ioctl can be restarted). The manpage signal(7) says that the ioctl function should be restarted if the signal was handled with SA_RESTART. Signed-off-by: Mikulas Patocka <[email protected]> Cc: [email protected]
1 parent 7c626ce commit 1e1fd56

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/md/dm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2737,7 +2737,7 @@ static int dm_wait_for_bios_completion(struct mapped_device *md, unsigned int ta
27372737
break;
27382738

27392739
if (signal_pending_state(task_state, current)) {
2740-
r = -EINTR;
2740+
r = -ERESTARTSYS;
27412741
break;
27422742
}
27432743

@@ -2762,7 +2762,7 @@ static int dm_wait_for_completion(struct mapped_device *md, unsigned int task_st
27622762
break;
27632763

27642764
if (signal_pending_state(task_state, current)) {
2765-
r = -EINTR;
2765+
r = -ERESTARTSYS;
27662766
break;
27672767
}
27682768

0 commit comments

Comments
 (0)