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
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -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;
	}
	}