Message ID | 20190415183734.095752921@linuxfoundation.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | None | expand |
--- a/block/bio.c +++ b/block/bio.c @@ -1280,8 +1280,11 @@ struct bio *bio_copy_user_iov(struct req } } - if (bio_add_pc_page(q, bio, page, bytes, offset) < bytes) + if (bio_add_pc_page(q, bio, page, bytes, offset) < bytes) { + if (!map_data) + __free_page(page); break; + } len -= bytes; offset = 0;