diff options
Diffstat (limited to 'fs/bio.c')
-rw-r--r-- | fs/bio.c | 18 |
1 files changed, 2 insertions, 16 deletions
@@ -560,10 +560,8 @@ struct bio *bio_copy_user(request_queue_t *q, unsigned long uaddr, | |||
560 | break; | 560 | break; |
561 | } | 561 | } |
562 | 562 | ||
563 | if (bio_add_pc_page(q, bio, page, bytes, 0) < bytes) { | 563 | if (bio_add_pc_page(q, bio, page, bytes, 0) < bytes) |
564 | ret = -EINVAL; | ||
565 | break; | 564 | break; |
566 | } | ||
567 | 565 | ||
568 | len -= bytes; | 566 | len -= bytes; |
569 | } | 567 | } |
@@ -750,7 +748,6 @@ struct bio *bio_map_user_iov(request_queue_t *q, struct block_device *bdev, | |||
750 | int write_to_vm) | 748 | int write_to_vm) |
751 | { | 749 | { |
752 | struct bio *bio; | 750 | struct bio *bio; |
753 | int len = 0, i; | ||
754 | 751 | ||
755 | bio = __bio_map_user_iov(q, bdev, iov, iov_count, write_to_vm); | 752 | bio = __bio_map_user_iov(q, bdev, iov, iov_count, write_to_vm); |
756 | 753 | ||
@@ -765,18 +762,7 @@ struct bio *bio_map_user_iov(request_queue_t *q, struct block_device *bdev, | |||
765 | */ | 762 | */ |
766 | bio_get(bio); | 763 | bio_get(bio); |
767 | 764 | ||
768 | for (i = 0; i < iov_count; i++) | 765 | return bio; |
769 | len += iov[i].iov_len; | ||
770 | |||
771 | if (bio->bi_size == len) | ||
772 | return bio; | ||
773 | |||
774 | /* | ||
775 | * don't support partial mappings | ||
776 | */ | ||
777 | bio_endio(bio, bio->bi_size, 0); | ||
778 | bio_unmap_user(bio); | ||
779 | return ERR_PTR(-EINVAL); | ||
780 | } | 766 | } |
781 | 767 | ||
782 | static void __bio_unmap_user(struct bio *bio) | 768 | static void __bio_unmap_user(struct bio *bio) |