* [PATCH] md/raid0: Fix an error message in raid0_make_request()
@ 2019-09-21 6:00 Dan Carpenter
2019-10-01 23:08 ` Song Liu
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2019-09-21 6:00 UTC (permalink / raw)
To: Song Liu, NeilBrown; +Cc: linux-raid, linux-kernel, kernel-janitors
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: c84a1372df92 ("md/raid0: avoid RAID0 data corruption due to layout confusion.")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/md/raid0.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c
index f61693e59684..3956ea502f97 100644
--- a/drivers/md/raid0.c
+++ b/drivers/md/raid0.c
@@ -615,7 +615,7 @@ static bool raid0_make_request(struct mddev *mddev, struct bio *bio)
tmp_dev = map_sector(mddev, zone, sector, §or);
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;
}
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] md/raid0: Fix an error message in raid0_make_request()
2019-09-21 6:00 [PATCH] md/raid0: Fix an error message in raid0_make_request() Dan Carpenter
@ 2019-10-01 23:08 ` Song Liu
0 siblings, 0 replies; 2+ messages in thread
From: Song Liu @ 2019-10-01 23:08 UTC (permalink / raw)
To: Dan Carpenter; +Cc: NeilBrown, linux-raid, open list, kernel-janitors
On Fri, Sep 20, 2019 at 11:00 PM Dan Carpenter <dan.carpenter@oracle.com> wrote:
>
> 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: c84a1372df92 ("md/raid0: avoid RAID0 data corruption due to layout confusion.")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> drivers/md/raid0.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c
> index f61693e59684..3956ea502f97 100644
> --- a/drivers/md/raid0.c
> +++ b/drivers/md/raid0.c
> @@ -615,7 +615,7 @@ static bool raid0_make_request(struct mddev *mddev, struct bio *bio)
> tmp_dev = map_sector(mddev, zone, sector, §or);
> 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;
Applied. Thanks for the fix!
Song
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-01 23:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-21 6:00 [PATCH] md/raid0: Fix an error message in raid0_make_request() Dan Carpenter
2019-10-01 23:08 ` Song Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox