Commit 5e20a8ee authored by Dan Carpenter's avatar Dan Carpenter Committed by Khalid Elmously

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

BugLink: https://bugs.launchpad.net/bugs/1850540

[ Upstream commit e3fc3f3d ]

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: c84a1372 ("md/raid0: avoid RAID0 data corruption due to layout confusion.")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarSong Liu <songliubraving@fb.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatardann frazier <dann.frazier@canonical.com>
(backported from bionic/18.04 submission into xenial/16.04)
[smb: minor contextual adjustments]
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
Acked-by: default avatarStefan Bader <stefan.bader@canonical.com>
Acked-by: default avatarMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Signed-off-by: default avatarKhalid Elmously <khalid.elmously@canonical.com>
parent b1447f3e
......@@ -513,7 +513,7 @@ static void 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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment