block: Fix front merge check
authorDamien Le Moal <damien.lemoal@hgst.com>
Thu, 21 Jul 2016 03:40:47 +0000 (21:40 -0600)
committerJens Axboe <axboe@fb.com>
Thu, 21 Jul 2016 03:40:47 +0000 (21:40 -0600)
commit17007f3994cdb4643355c73f54f0adad006cf59e
treeac5aab0bf6211f1dc878872db5ec73f9b99bda5b
parent72ef799b3f14f4cb4c56ba3af6e6bdcbae6df368
block: Fix front merge check

For a front merge, the maximum number of sectors of the
request must be checked against the front merge BIO sector,
not the current sector of the request.

Signed-off-by: Damien Le Moal <damien.lemoal@hgst.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-merge.c
include/linux/blkdev.h