|
@@ -906,16 +906,10 @@ bio_pageinc(struct bio *bio)
|
|
|
int i;
|
|
|
|
|
|
bio_for_each_segment(bv, bio, i) {
|
|
|
- page = bv->bv_page;
|
|
|
/* Non-zero page count for non-head members of
|
|
|
- * compound pages is no longer allowed by the kernel,
|
|
|
- * but this has never been seen here.
|
|
|
+ * compound pages is no longer allowed by the kernel.
|
|
|
*/
|
|
|
- if (unlikely(PageCompound(page)))
|
|
|
- if (compound_trans_head(page) != page) {
|
|
|
- pr_crit("page tail used for block I/O\n");
|
|
|
- BUG();
|
|
|
- }
|
|
|
+ page = compound_trans_head(bv->bv_page);
|
|
|
atomic_inc(&page->_count);
|
|
|
}
|
|
|
}
|
|
@@ -924,10 +918,13 @@ static void
|
|
|
bio_pagedec(struct bio *bio)
|
|
|
{
|
|
|
struct bio_vec *bv;
|
|
|
+ struct page *page;
|
|
|
int i;
|
|
|
|
|
|
- bio_for_each_segment(bv, bio, i)
|
|
|
- atomic_dec(&bv->bv_page->_count);
|
|
|
+ bio_for_each_segment(bv, bio, i) {
|
|
|
+ page = compound_trans_head(bv->bv_page);
|
|
|
+ atomic_dec(&page->_count);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
static void
|