From 6ebbf06bbd101ab572bdf581e5baec320f61848a Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 10 Sep 2002 15:02:09 -0700 Subject: 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. --- include/linux/bio.h | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'include') 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); -- cgit v1.2.3