Now queue_limits_cancel_update() becomes nop, so remove it. Signed-off-by: Ming Lei <ming.lei@xxxxxxxxxx> --- drivers/md/md.c | 1 - drivers/md/raid0.c | 4 +--- drivers/md/raid1.c | 4 +--- drivers/md/raid10.c | 4 +--- drivers/scsi/scsi_scan.c | 1 - include/linux/blkdev.h | 12 ------------ 6 files changed, 3 insertions(+), 23 deletions(-) diff --git a/drivers/md/md.c b/drivers/md/md.c index aebe12b0ee27..4a3e109dfa11 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -5788,7 +5788,6 @@ int mddev_stack_new_rdev(struct mddev *mddev, struct md_rdev *rdev) if (!queue_limits_stack_integrity_bdev(&lim, rdev->bdev)) { pr_err("%s: incompatible integrity profile for %pg\n", mdname(mddev), rdev->bdev); - queue_limits_cancel_update(mddev->gendisk->queue); return -ENXIO; } diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c index 7049ec7fb8eb..e8802309ed60 100644 --- a/drivers/md/raid0.c +++ b/drivers/md/raid0.c @@ -386,10 +386,8 @@ static int raid0_set_limits(struct mddev *mddev) lim.io_opt = lim.io_min * mddev->raid_disks; lim.features |= BLK_FEAT_ATOMIC_WRITES_STACKED; err = mddev_stack_rdev_limits(mddev, &lim, MDDEV_STACK_INTEGRITY); - if (err) { - queue_limits_cancel_update(mddev->gendisk->queue); + if (err) return err; - } return queue_limits_set(mddev->gendisk->queue, &lim); } diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index 519c56f0ee3d..c6e53cc57440 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c @@ -3241,10 +3241,8 @@ static int raid1_set_limits(struct mddev *mddev) lim.max_write_zeroes_sectors = 0; lim.features |= BLK_FEAT_ATOMIC_WRITES_STACKED; err = mddev_stack_rdev_limits(mddev, &lim, MDDEV_STACK_INTEGRITY); - if (err) { - queue_limits_cancel_update(mddev->gendisk->queue); + if (err) return err; - } return queue_limits_set(mddev->gendisk->queue, &lim); } diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index 7d7a8a2524dc..6acc96be77aa 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c @@ -4042,10 +4042,8 @@ static int raid10_set_queue_limits(struct mddev *mddev) lim.io_opt = lim.io_min * raid10_nr_stripes(conf); lim.features |= BLK_FEAT_ATOMIC_WRITES_STACKED; err = mddev_stack_rdev_limits(mddev, &lim, MDDEV_STACK_INTEGRITY); - if (err) { - queue_limits_cancel_update(mddev->gendisk->queue); + if (err) return err; - } return queue_limits_set(mddev->gendisk->queue, &lim); } diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index 042329b74c6e..3e3f64cec9ee 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c @@ -1079,7 +1079,6 @@ static int scsi_add_lun(struct scsi_device *sdev, unsigned char *inq_result, else if (hostt->slave_configure) ret = hostt->slave_configure(sdev); if (ret) { - queue_limits_cancel_update(sdev->request_queue); /* * If the LLDD reports device not present, don't clutter the * console with failure messages. diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 6cc20ca79adc..b2542d3dcc23 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -957,18 +957,6 @@ int queue_limits_commit_update(struct request_queue *q, int queue_limits_set(struct request_queue *q, struct queue_limits *lim); int blk_validate_limits(struct queue_limits *lim); -/** - * queue_limits_cancel_update - cancel an atomic update of queue limits - * @q: queue to update - * - * This functions cancels an atomic update of the queue limits started by - * queue_limits_start_update() and should be used when an error occurs after - * starting update. - */ -static inline void queue_limits_cancel_update(struct request_queue *q) -{ -} - /* * These helpers are for drivers that have sloppy feature negotiation and might * have to disable DISCARD, WRITE_ZEROES or SECURE_DISCARD from the I/O -- 2.47.0