Message ID | 20180609123014.8861-3-ming.lei@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/block/bio.c b/block/bio.c index 3e7d117c3346..ebd3ca62e037 100644 --- a/block/bio.c +++ b/block/bio.c @@ -1634,10 +1634,8 @@ void bio_set_pages_dirty(struct bio *bio) int i; bio_for_each_segment_all(bvec, bio, i) { - struct page *page = bvec->bv_page; - - if (page && !PageCompound(page)) - set_page_dirty_lock(page); + if (!PageCompound(bvec->bv_page)) + set_page_dirty_lock(bvec->bv_page); } } EXPORT_SYMBOL_GPL(bio_set_pages_dirty);