summaryrefslogtreecommitdiff
path: root/block/genhd.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/genhd.c
parent1bdd5ae0251d678488dffcf455d4633c2beef1bc (diff)
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/genhd.c')
-rw-r--r--block/genhd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/genhd.c b/block/genhd.c
index 0bd7026cee62..f9c957739d4b 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -1292,7 +1292,7 @@ ssize_t part_fail_show(struct device *dev,
{
struct hd_struct *p = dev_to_part(dev);
- return sprintf(buf, "%d\n", p->make_it_fail);
+ return sprintf(buf, "%d\n", p->bdev->bd_make_it_fail);
}
ssize_t part_fail_store(struct device *dev,
@@ -1303,7 +1303,7 @@ ssize_t part_fail_store(struct device *dev,
int i;
if (count > 0 && sscanf(buf, "%d", &i) > 0)
- p->make_it_fail = (i == 0) ? 0 : 1;
+ p->bdev->bd_make_it_fail = i;
return count;
}