diff options
| author | David S. Miller <davem@davemloft.net> | 2019-03-27 17:37:58 -0700 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2019-03-27 17:37:58 -0700 |
| commit | 356d71e00d278d865f8c7f68adebd6ce4698a7e2 (patch) | |
| tree | 8cb2dabf7440b56c6dee76b4253210c6b603b98e /fs/iomap.c | |
| parent | df453700e8d81b1bdafdf684365ee2b9431fb702 (diff) | |
| parent | 1a9df9e29c2afecf6e3089442d429b377279ca3c (diff) | |
| download | net-356d71e00d278d865f8c7f68adebd6ce4698a7e2.tar.gz | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'fs/iomap.c')
| -rw-r--r-- | fs/iomap.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/iomap.c b/fs/iomap.c index 97cb9d486a7da3..abdd18e404f8cd 100644 --- a/fs/iomap.c +++ b/fs/iomap.c @@ -1589,12 +1589,14 @@ static void iomap_dio_bio_end_io(struct bio *bio) if (should_dirty) { bio_check_pages_dirty(bio); } else { - struct bio_vec *bvec; - int i; - struct bvec_iter_all iter_all; + if (!bio_flagged(bio, BIO_NO_PAGE_REF)) { + struct bvec_iter_all iter_all; + struct bio_vec *bvec; + int i; - bio_for_each_segment_all(bvec, bio, i, iter_all) - put_page(bvec->bv_page); + bio_for_each_segment_all(bvec, bio, i, iter_all) + put_page(bvec->bv_page); + } bio_put(bio); } } |
