Commit 9eb55b030c4b3227334ee4482402096cd1d1a6fe
Committed by
Jens Axboe
1 parent
c69d48540c
Exists in
master
and in
7 other branches
block: catch trying to use more bits than request->cmd_flags has
Signed-off-by: Nikanth Karthikesan <knikanth@suse.de> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Showing 1 changed file with 3 additions and 0 deletions Side-by-side Diff
block/blk-core.c
... | ... | @@ -2097,6 +2097,9 @@ |
2097 | 2097 | |
2098 | 2098 | int __init blk_dev_init(void) |
2099 | 2099 | { |
2100 | + BUILD_BUG_ON(__REQ_NR_BITS > 8 * | |
2101 | + sizeof(((struct request *)0)->cmd_flags)); | |
2102 | + | |
2100 | 2103 | kblockd_workqueue = create_workqueue("kblockd"); |
2101 | 2104 | if (!kblockd_workqueue) |
2102 | 2105 | panic("Failed to create kblockd\n"); |