git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vserver 1.9.5.x5
[linux-2.6.git]
/
mm
/
highmem.c
diff --git
a/mm/highmem.c
b/mm/highmem.c
index
c190cf8
..
e4cb0aa
100644
(file)
--- a/
mm/highmem.c
+++ b/
mm/highmem.c
@@
-53,7
+53,7
@@
static void page_pool_free(void *page, void *data)
#ifdef CONFIG_HIGHMEM
static int pkmap_count[LAST_PKMAP];
static unsigned int last_pkmap_nr;
#ifdef CONFIG_HIGHMEM
static int pkmap_count[LAST_PKMAP];
static unsigned int last_pkmap_nr;
-static
spinlock_t kmap_lock __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED
;
+static
__cacheline_aligned_in_smp DEFINE_SPINLOCK(kmap_lock)
;
pte_t * pkmap_page_table;
pte_t * pkmap_page_table;
@@
-305,14
+305,14
@@
static void copy_to_high_bio_irq(struct bio *to, struct bio *from)
}
}
}
}
-static void bounce_end_io(struct bio *bio, mempool_t *pool)
+static void bounce_end_io(struct bio *bio, mempool_t *pool
, int err
)
{
struct bio *bio_orig = bio->bi_private;
struct bio_vec *bvec, *org_vec;
{
struct bio *bio_orig = bio->bi_private;
struct bio_vec *bvec, *org_vec;
- int i
, err = 0
;
+ int i;
- if (
!test_bit(BIO_UPTODATE
, &bio->bi_flags))
-
err = -EIO
;
+ if (
test_bit(BIO_EOPNOTSUPP
, &bio->bi_flags))
+
set_bit(BIO_EOPNOTSUPP, &bio_orig->bi_flags)
;
/*
* free up bounce indirect pages used
/*
* free up bounce indirect pages used
@@
-334,7
+334,7
@@
static int bounce_end_io_write(struct bio *bio, unsigned int bytes_done,int err)
if (bio->bi_size)
return 1;
if (bio->bi_size)
return 1;
- bounce_end_io(bio, page_pool);
+ bounce_end_io(bio, page_pool
, err
);
return 0;
}
return 0;
}
@@
-343,18
+343,18
@@
static int bounce_end_io_write_isa(struct bio *bio, unsigned int bytes_done, int
if (bio->bi_size)
return 1;
if (bio->bi_size)
return 1;
- bounce_end_io(bio, isa_page_pool);
+ bounce_end_io(bio, isa_page_pool
, err
);
return 0;
}
return 0;
}
-static void __bounce_end_io_read(struct bio *bio, mempool_t *pool)
+static void __bounce_end_io_read(struct bio *bio, mempool_t *pool
, int err
)
{
struct bio *bio_orig = bio->bi_private;
if (test_bit(BIO_UPTODATE, &bio->bi_flags))
copy_to_high_bio_irq(bio_orig, bio);
{
struct bio *bio_orig = bio->bi_private;
if (test_bit(BIO_UPTODATE, &bio->bi_flags))
copy_to_high_bio_irq(bio_orig, bio);
- bounce_end_io(bio, pool);
+ bounce_end_io(bio, pool
, err
);
}
static int bounce_end_io_read(struct bio *bio, unsigned int bytes_done, int err)
}
static int bounce_end_io_read(struct bio *bio, unsigned int bytes_done, int err)
@@
-362,7
+362,7
@@
static int bounce_end_io_read(struct bio *bio, unsigned int bytes_done, int err)
if (bio->bi_size)
return 1;
if (bio->bi_size)
return 1;
- __bounce_end_io_read(bio, page_pool);
+ __bounce_end_io_read(bio, page_pool
, err
);
return 0;
}
return 0;
}
@@
-371,7
+371,7
@@
static int bounce_end_io_read_isa(struct bio *bio, unsigned int bytes_done, int
if (bio->bi_size)
return 1;
if (bio->bi_size)
return 1;
- __bounce_end_io_read(bio, isa_page_pool);
+ __bounce_end_io_read(bio, isa_page_pool
, err
);
return 0;
}
return 0;
}
@@
-425,7
+425,7
@@
static void __blk_queue_bounce(request_queue_t *q, struct bio **bio_orig,
* at least one page was bounced, fill in possible non-highmem
* pages
*/
* at least one page was bounced, fill in possible non-highmem
* pages
*/
-
bio_for_each_segment(from, *bio_orig, i
) {
+
__bio_for_each_segment(from, *bio_orig, i, 0
) {
to = bio_iovec_idx(bio, i);
if (!to->bv_page) {
to->bv_page = from->bv_page;
to = bio_iovec_idx(bio, i);
if (!to->bv_page) {
to->bv_page = from->bv_page;