aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-07-24 08:04:13 -0400
committerJens Axboe <axboe@kernel.dk>2018-07-24 16:39:28 -0400
commit3bb5098310317ca62304bd21af6ccea57d799b06 (patch)
tree67273c4ef20f233c77023131c5e1eac6831d4f39
parent24d5493f207ce0ce38df80ce86c907417e04594a (diff)
block: bio_set_pages_dirty can't see NULL bv_page in a valid bio_vec
So don't bother handling it. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--block/bio.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/block/bio.c b/block/bio.c
index 504b42278099..07d3ffd95989 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -1636,10 +1636,8 @@ void bio_set_pages_dirty(struct bio *bio)
1636 int i; 1636 int i;
1637 1637
1638 bio_for_each_segment_all(bvec, bio, i) { 1638 bio_for_each_segment_all(bvec, bio, i) {
1639 struct page *page = bvec->bv_page; 1639 if (!PageCompound(bvec->bv_page))
1640 1640 set_page_dirty_lock(bvec->bv_page);
1641 if (page && !PageCompound(page))
1642 set_page_dirty_lock(page);
1643 } 1641 }
1644} 1642}
1645EXPORT_SYMBOL_GPL(bio_set_pages_dirty); 1643EXPORT_SYMBOL_GPL(bio_set_pages_dirty);