Skip to content

Commit

Permalink
block: bio_set_pages_dirty can't see NULL bv_page in a valid bio_vec
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christoph Hellwig authored and Jens Axboe committed Jul 24, 2018
1 parent 24d5493 commit 3bb5098
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions block/bio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3bb5098

Please sign in to comment.