md/raid0: Fix an error message in raid0_make_request()

The first argument to WARN() is supposed to be a condition.  The
original code will just print the mdname() instead of the full warning
message.

Fixes: c84a1372df ("md/raid0: avoid RAID0 data corruption due to layout confusion.")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Song Liu <songliubraving@fb.com>
This commit is contained in:
Dan Carpenter 2019-09-21 09:00:31 +03:00 коммит произвёл Song Liu
Родитель dd85b4922d
Коммит e3fc3f3d09
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -615,7 +615,7 @@ static bool raid0_make_request(struct mddev *mddev, struct bio *bio)
tmp_dev = map_sector(mddev, zone, sector, &sector);
break;
default:
WARN("md/raid0:%s: Invalid layout\n", mdname(mddev));
WARN(1, "md/raid0:%s: Invalid layout\n", mdname(mddev));
bio_io_error(bio);
return true;
}