From: Li Nan <linan122@xxxxxxxxxx> In mddev_stack_new_rdev(), if the integrity profile check fails, it returns -ENXIO, which means "No such device or address". This is inaccurate and can mislead users. Change it to return -EINVAL. Fixes: c6e56cf6b2e7 ("block: move integrity information into queue_limits") Signed-off-by: Li Nan <linan122@xxxxxxxxxx> --- drivers/md/md.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/md.c b/drivers/md/md.c index 48c35b6fb52e..e974280b38bb 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -5869,7 +5869,7 @@ int mddev_stack_new_rdev(struct mddev *mddev, struct md_rdev *rdev) pr_err("%s: incompatible integrity profile for %pg\n", mdname(mddev), rdev->bdev); queue_limits_cancel_update(mddev->gendisk->queue); - return -ENXIO; + return -EINVAL; } return queue_limits_commit_update(mddev->gendisk->queue, &lim); -- 2.39.2