summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@hera.kernel.org>2002-09-10 15:02:09 -0700
committerJens Axboe <axboe@hera.kernel.org>2002-09-10 15:02:09 -0700
commit6ebbf06bbd101ab572bdf581e5baec320f61848a (patch)
treed40e2dca279190db6cd312a4ad4807ea09bb1ad0
parentfe0e434158eda051ea025b7fea02eec5f01e04d4 (diff)
bio.h:
clean up with bio_kmap_irq() thing properly. remove the micro optimization of _not_ calling kmap_atomic() if this isn't a highmem page. we could keep that and do the inc_preempt_count() ourselves, but I'm not sure it's worth it and this is cleaner.
-rw-r--r--include/linux/bio.h12
1 files changed, 3 insertions, 9 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h
index fee72762ad8d..5fdfd8e8936c 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -215,17 +215,11 @@ extern inline char *bio_kmap_irq(struct bio *bio, unsigned long *flags)
{
unsigned long addr;
- local_save_flags(*flags);
-
- /*
- * could be low
- */
- if (!PageHighMem(bio_page(bio)))
- return bio_data(bio);
-
/*
- * it's a highmem page
+ * might not be a highmem page, but the preempt/irq count
+ * balancing is a lot nicer this way
*/
+ local_save_flags(*flags);
local_irq_disable();
addr = (unsigned long) kmap_atomic(bio_page(bio), KM_BIO_SRC_IRQ);