summaryrefslogtreecommitdiffstats
path: root/block/bio.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2016-03-04 12:12:08 +0100
committerIngo Molnar <mingo@kernel.org>2016-03-04 12:12:08 +0100
commitbc94b99636dc7bcccce439a9fb9c00065e2e2627 (patch)
treebddbd29a5fd7b2d270d039efc1d6858791a2c98f /block/bio.c
parent4650bac1fc45d64aef62ab99aa4db93d41dedbd9 (diff)
parentfc77dbd34c5c99bce46d40a2491937c3bcbd10af (diff)
downloadop-kernel-dev-bc94b99636dc7bcccce439a9fb9c00065e2e2627.zip
op-kernel-dev-bc94b99636dc7bcccce439a9fb9c00065e2e2627.tar.gz
Merge tag 'v4.5-rc6' into core/resources, to resolve conflict
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'block/bio.c')
-rw-r--r--block/bio.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/block/bio.c b/block/bio.c
index dbabd48..cf75915 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -874,7 +874,7 @@ int submit_bio_wait(int rw, struct bio *bio)
bio->bi_private = &ret;
bio->bi_end_io = submit_bio_wait_endio;
submit_bio(rw, bio);
- wait_for_completion(&ret.event);
+ wait_for_completion_io(&ret.event);
return ret.error;
}
@@ -1090,9 +1090,12 @@ int bio_uncopy_user(struct bio *bio)
if (!bio_flagged(bio, BIO_NULL_MAPPED)) {
/*
* if we're in a workqueue, the request is orphaned, so
- * don't copy into a random user address space, just free.
+ * don't copy into a random user address space, just free
+ * and return -EINTR so user space doesn't expect any data.
*/
- if (current->mm && bio_data_dir(bio) == READ)
+ if (!current->mm)
+ ret = -EINTR;
+ else if (bio_data_dir(bio) == READ)
ret = bio_copy_to_iter(bio, bmd->iter);
if (bmd->is_our_pages)
bio_free_pages(bio);
OpenPOWER on IntegriCloud