Skip to content
Snippets Groups Projects
Commit e3fc3f3d authored by Dan Carpenter's avatar Dan Carpenter Committed by Song Liu
Browse files

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: 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>
parent dd85b492
No related branches found
No related tags found
No related merge requests found
...@@ -615,7 +615,7 @@ static bool raid0_make_request(struct mddev *mddev, struct bio *bio) ...@@ -615,7 +615,7 @@ static bool raid0_make_request(struct mddev *mddev, struct bio *bio)
tmp_dev = map_sector(mddev, zone, sector, &sector); tmp_dev = map_sector(mddev, zone, sector, &sector);
break; break;
default: default:
WARN("md/raid0:%s: Invalid layout\n", mdname(mddev)); WARN(1, "md/raid0:%s: Invalid layout\n", mdname(mddev));
bio_io_error(bio); bio_io_error(bio);
return true; return true;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment