diff options
author | David Howells <dhowells@redhat.com> | 2006-12-05 09:37:56 -0500 |
---|---|---|
committer | David Howells <dhowells@warthog.cambridge.redhat.com> | 2006-12-05 09:37:56 -0500 |
commit | 4c1ac1b49122b805adfa4efc620592f68dccf5db (patch) | |
tree | 87557f4bc2fd4fe65b7570489c2f610c45c0adcd /fs/bio.c | |
parent | c4028958b6ecad064b1a6303a6a5906d4fe48d73 (diff) | |
parent | d916faace3efc0bf19fe9a615a1ab8fa1a24cd93 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
drivers/infiniband/core/iwcm.c
drivers/net/chelsio/cxgb2.c
drivers/net/wireless/bcm43xx/bcm43xx_main.c
drivers/net/wireless/prism54/islpci_eth.c
drivers/usb/core/hub.h
drivers/usb/input/hid-core.c
net/core/netpoll.c
Fix up merge failures with Linus's head and fix new compilation failures.
Signed-Off-By: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/bio.c')
-rw-r--r-- | fs/bio.c | 23 |
1 files changed, 4 insertions, 19 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 | } |
@@ -622,10 +620,9 @@ static struct bio *__bio_map_user_iov(request_queue_t *q, | |||
622 | 620 | ||
623 | nr_pages += end - start; | 621 | nr_pages += end - start; |
624 | /* | 622 | /* |
625 | * transfer and buffer must be aligned to at least hardsector | 623 | * buffer must be aligned to at least hardsector size for now |
626 | * size for now, in the future we can relax this restriction | ||
627 | */ | 624 | */ |
628 | if ((uaddr & queue_dma_alignment(q)) || (len & queue_dma_alignment(q))) | 625 | if (uaddr & queue_dma_alignment(q)) |
629 | return ERR_PTR(-EINVAL); | 626 | return ERR_PTR(-EINVAL); |
630 | } | 627 | } |
631 | 628 | ||
@@ -751,7 +748,6 @@ struct bio *bio_map_user_iov(request_queue_t *q, struct block_device *bdev, | |||
751 | int write_to_vm) | 748 | int write_to_vm) |
752 | { | 749 | { |
753 | struct bio *bio; | 750 | struct bio *bio; |
754 | int len = 0, i; | ||
755 | 751 | ||
756 | 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); |
757 | 753 | ||
@@ -766,18 +762,7 @@ struct bio *bio_map_user_iov(request_queue_t *q, struct block_device *bdev, | |||
766 | */ | 762 | */ |
767 | bio_get(bio); | 763 | bio_get(bio); |
768 | 764 | ||
769 | for (i = 0; i < iov_count; i++) | 765 | return bio; |
770 | len += iov[i].iov_len; | ||
771 | |||
772 | if (bio->bi_size == len) | ||
773 | return bio; | ||
774 | |||
775 | /* | ||
776 | * don't support partial mappings | ||
777 | */ | ||
778 | bio_endio(bio, bio->bi_size, 0); | ||
779 | bio_unmap_user(bio); | ||
780 | return ERR_PTR(-EINVAL); | ||
781 | } | 766 | } |
782 | 767 | ||
783 | static void __bio_unmap_user(struct bio *bio) | 768 | static void __bio_unmap_user(struct bio *bio) |