diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/bounce.c | 25 | ||||
-rw-r--r-- | mm/page_io.c | 12 |
2 files changed, 7 insertions, 30 deletions
diff --git a/mm/bounce.c b/mm/bounce.c index 179fe38a2416..3b549bf31f7d 100644 --- a/mm/bounce.c +++ b/mm/bounce.c | |||
@@ -140,26 +140,19 @@ static void bounce_end_io(struct bio *bio, mempool_t *pool, int err) | |||
140 | mempool_free(bvec->bv_page, pool); | 140 | mempool_free(bvec->bv_page, pool); |
141 | } | 141 | } |
142 | 142 | ||
143 | bio_endio(bio_orig, bio_orig->bi_size, err); | 143 | bio_endio(bio_orig, err); |
144 | bio_put(bio); | 144 | bio_put(bio); |
145 | } | 145 | } |
146 | 146 | ||
147 | static int bounce_end_io_write(struct bio *bio, unsigned int bytes_done, int err) | 147 | static void bounce_end_io_write(struct bio *bio, int err) |
148 | { | 148 | { |
149 | if (bio->bi_size) | ||
150 | return 1; | ||
151 | |||
152 | bounce_end_io(bio, page_pool, err); | 149 | bounce_end_io(bio, page_pool, err); |
153 | return 0; | ||
154 | } | 150 | } |
155 | 151 | ||
156 | static int bounce_end_io_write_isa(struct bio *bio, unsigned int bytes_done, int err) | 152 | static void bounce_end_io_write_isa(struct bio *bio, int err) |
157 | { | 153 | { |
158 | if (bio->bi_size) | ||
159 | return 1; | ||
160 | 154 | ||
161 | bounce_end_io(bio, isa_page_pool, err); | 155 | bounce_end_io(bio, isa_page_pool, err); |
162 | return 0; | ||
163 | } | 156 | } |
164 | 157 | ||
165 | static void __bounce_end_io_read(struct bio *bio, mempool_t *pool, int err) | 158 | static void __bounce_end_io_read(struct bio *bio, mempool_t *pool, int err) |
@@ -172,22 +165,14 @@ static void __bounce_end_io_read(struct bio *bio, mempool_t *pool, int err) | |||
172 | bounce_end_io(bio, pool, err); | 165 | bounce_end_io(bio, pool, err); |
173 | } | 166 | } |
174 | 167 | ||
175 | static int bounce_end_io_read(struct bio *bio, unsigned int bytes_done, int err) | 168 | static void bounce_end_io_read(struct bio *bio, int err) |
176 | { | 169 | { |
177 | if (bio->bi_size) | ||
178 | return 1; | ||
179 | |||
180 | __bounce_end_io_read(bio, page_pool, err); | 170 | __bounce_end_io_read(bio, page_pool, err); |
181 | return 0; | ||
182 | } | 171 | } |
183 | 172 | ||
184 | static int bounce_end_io_read_isa(struct bio *bio, unsigned int bytes_done, int err) | 173 | static void bounce_end_io_read_isa(struct bio *bio, int err) |
185 | { | 174 | { |
186 | if (bio->bi_size) | ||
187 | return 1; | ||
188 | |||
189 | __bounce_end_io_read(bio, isa_page_pool, err); | 175 | __bounce_end_io_read(bio, isa_page_pool, err); |
190 | return 0; | ||
191 | } | 176 | } |
192 | 177 | ||
193 | static void __blk_queue_bounce(struct request_queue *q, struct bio **bio_orig, | 178 | static void __blk_queue_bounce(struct request_queue *q, struct bio **bio_orig, |
diff --git a/mm/page_io.c b/mm/page_io.c index dbffec0d78c9..3b97f6850273 100644 --- a/mm/page_io.c +++ b/mm/page_io.c | |||
@@ -44,14 +44,11 @@ static struct bio *get_swap_bio(gfp_t gfp_flags, pgoff_t index, | |||
44 | return bio; | 44 | return bio; |
45 | } | 45 | } |
46 | 46 | ||
47 | static int end_swap_bio_write(struct bio *bio, unsigned int bytes_done, int err) | 47 | static void end_swap_bio_write(struct bio *bio, int err) |
48 | { | 48 | { |
49 | const int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags); | 49 | const int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags); |
50 | struct page *page = bio->bi_io_vec[0].bv_page; | 50 | struct page *page = bio->bi_io_vec[0].bv_page; |
51 | 51 | ||
52 | if (bio->bi_size) | ||
53 | return 1; | ||
54 | |||
55 | if (!uptodate) { | 52 | if (!uptodate) { |
56 | SetPageError(page); | 53 | SetPageError(page); |
57 | /* | 54 | /* |
@@ -71,17 +68,13 @@ static int end_swap_bio_write(struct bio *bio, unsigned int bytes_done, int err) | |||
71 | } | 68 | } |
72 | end_page_writeback(page); | 69 | end_page_writeback(page); |
73 | bio_put(bio); | 70 | bio_put(bio); |
74 | return 0; | ||
75 | } | 71 | } |
76 | 72 | ||
77 | int end_swap_bio_read(struct bio *bio, unsigned int bytes_done, int err) | 73 | void end_swap_bio_read(struct bio *bio, int err) |
78 | { | 74 | { |
79 | const int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags); | 75 | const int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags); |
80 | struct page *page = bio->bi_io_vec[0].bv_page; | 76 | struct page *page = bio->bi_io_vec[0].bv_page; |
81 | 77 | ||
82 | if (bio->bi_size) | ||
83 | return 1; | ||
84 | |||
85 | if (!uptodate) { | 78 | if (!uptodate) { |
86 | SetPageError(page); | 79 | SetPageError(page); |
87 | ClearPageUptodate(page); | 80 | ClearPageUptodate(page); |
@@ -94,7 +87,6 @@ int end_swap_bio_read(struct bio *bio, unsigned int bytes_done, int err) | |||
94 | } | 87 | } |
95 | unlock_page(page); | 88 | unlock_page(page); |
96 | bio_put(bio); | 89 | bio_put(bio); |
97 | return 0; | ||
98 | } | 90 | } |
99 | 91 | ||
100 | /* | 92 | /* |