Skip to content

Commit

Permalink
block: catch trying to use more bits than request->cmd_flags has
Browse files Browse the repository at this point in the history
Signed-off-by: Nikanth Karthikesan <knikanth@suse.de>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
  • Loading branch information
Nikanth Karthikesan authored and Jens Axboe committed Apr 28, 2009
1 parent c69d485 commit 9eb55b0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions block/blk-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2097,6 +2097,9 @@ EXPORT_SYMBOL(kblockd_schedule_work);

int __init blk_dev_init(void)
{
BUILD_BUG_ON(__REQ_NR_BITS > 8 *
sizeof(((struct request *)0)->cmd_flags));

kblockd_workqueue = create_workqueue("kblockd");
if (!kblockd_workqueue)
panic("Failed to create kblockd\n");
Expand Down

0 comments on commit 9eb55b0

Please sign in to comment.