diff options
| -rw-r--r-- | fs/block_dev.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c index 24615c76c1d0..bb28e2ead679 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c | |||
| @@ -264,7 +264,8 @@ __blkdev_direct_IO_simple(struct kiocb *iocb, struct iov_iter *iter, | |||
| 264 | bio_for_each_segment_all(bvec, &bio, i, iter_all) { | 264 | bio_for_each_segment_all(bvec, &bio, i, iter_all) { |
| 265 | if (should_dirty && !PageCompound(bvec->bv_page)) | 265 | if (should_dirty && !PageCompound(bvec->bv_page)) |
| 266 | set_page_dirty_lock(bvec->bv_page); | 266 | set_page_dirty_lock(bvec->bv_page); |
| 267 | put_page(bvec->bv_page); | 267 | if (!bio_flagged(&bio, BIO_NO_PAGE_REF)) |
| 268 | put_page(bvec->bv_page); | ||
| 268 | } | 269 | } |
| 269 | 270 | ||
| 270 | if (unlikely(bio.bi_status)) | 271 | if (unlikely(bio.bi_status)) |
