aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-core.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-11-23 16:28:47 +0100
committerJens Axboe <axboe@kernel.dk>2020-12-01 14:53:40 -0700
commitb309e9936347232c724eaa13f70533128b4864e9 (patch)
tree605597177f339d9934dfdfa7f25a0a947fd356e7 /block/blk-core.c
parentblock: move holder_dir to struct block_device (diff)
downloadlinux-dev-b309e9936347232c724eaa13f70533128b4864e9.tar.xz
linux-dev-b309e9936347232c724eaa13f70533128b4864e9.zip
block: move make_it_fail to struct block_device
Move the make_it_fail flag to struct block_device an turn it into a bool in preparation of killing struct hd_struct. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Jan Kara <jack@suse.cz> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-core.c')
-rw-r--r--block/blk-core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index 9a3793d5ce38..9121390be97a 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -668,7 +668,8 @@ __setup("fail_make_request=", setup_fail_make_request);
static bool should_fail_request(struct hd_struct *part, unsigned int bytes)
{
- return part->make_it_fail && should_fail(&fail_make_request, bytes);
+ return part->bdev->bd_make_it_fail &&
+ should_fail(&fail_make_request, bytes);
}
static int __init fail_make_request_debugfs(void)