]> git.baikalelectronics.ru Git - kernel.git/commit
block: ensure that bio_add_page() always accepts a page for an empty bio
authorJens Axboe <axboe@fb.com>
Tue, 10 Jun 2014 18:53:56 +0000 (12:53 -0600)
committerJens Axboe <axboe@fb.com>
Tue, 10 Jun 2014 18:53:56 +0000 (12:53 -0600)
commit757732f53eac6dbf90ee213352e04f606207b5d6
tree6481a87de33d3caa7b647c3347324eea1c474216
parente8bf69a9493a78a11ebf257f350d35e1498f5444
block: ensure that bio_add_page() always accepts a page for an empty bio

With commit 551dea29121b added support for chunk sizes and no merging
across them, it broke the rule of always allowing adding of a single
page to an empty bio. So relax the restriction a bit to allow for that,
similarly to what we have always done.

This fixes a crash with mkfs.xfs and 512b sector sizes on NVMe.

Reported-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/bio.c
block/blk-settings.c