[PATCH] block: Make blkdev_issue_discard() interruptible

Lukas Czerner
2010-10-21T14:34:54Z

block/blk-lib.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/block/blk-lib.c b/block/blk-lib.c
index c392029..204839b 100644
--- a/block/blk-lib.c
+++ b/block/blk-lib.c
@@ -101,6 +101,11 @@ int blkdev_issue_discard(struct block_device *bdev, sector_t sector,
else if (!bio_flagged(bio, BIO_UPTODATE))
ret = -EIO;
bio_put(bio);
+
+ if (fatal_signal_pending(current)) {
+ ret = -ERESTARTSYS;
+ break;
+ }
}

return ret;
--
1.7.2.3