Commit 9eb55b03 authored by Nikanth Karthikesan's avatar Nikanth Karthikesan Committed by Jens Axboe

block: catch trying to use more bits than request->cmd_flags has

Signed-off-by: default avatarNikanth Karthikesan <knikanth@suse.de>
Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
parent c69d4854
...@@ -2097,6 +2097,9 @@ EXPORT_SYMBOL(kblockd_schedule_work); ...@@ -2097,6 +2097,9 @@ EXPORT_SYMBOL(kblockd_schedule_work);
int __init blk_dev_init(void) int __init blk_dev_init(void)
{ {
BUILD_BUG_ON(__REQ_NR_BITS > 8 *
sizeof(((struct request *)0)->cmd_flags));
kblockd_workqueue = create_workqueue("kblockd"); kblockd_workqueue = create_workqueue("kblockd");
if (!kblockd_workqueue) if (!kblockd_workqueue)
panic("Failed to create kblockd\n"); panic("Failed to create kblockd\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment