Thread (4 messages) 4 messages, 2 authors, 2018-07-24
STALE2917d REVIEWED: 1 (0M)

[PATCH 2/2] block: bio_set_pages_dirty can't see NULL bv_page in a valid bio_vec

From: Christoph Hellwig <hch@lst.de>
Date: 2018-07-24 12:04:13
Subsystem: block layer, the rest · Maintainers: Jens Axboe, Linus Torvalds

So don't bother handling it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Ming Lei <redacted>
---
 block/bio.c | 6 ++----
 1 file 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)
 	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);
-- 
2.18.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help