md/raid1: Fix a warning message in remove_wb()
Subsystems (2)
PATCH 1/1 md/raid1: Fix a warning message in remove_wb()
The WARN_ON() macro doesn't take an error message, it just takes a condition. I've changed this to use WARN(1, "...") instead.
Fixes 3e148a320979 ("md/raid1: fix potential data inconsistency issue with write behind device")
Signed-off-by Dan Carpenter <[email protected]>
---
I also considered changing it to:
WARN(!found, "...");
but I decided this way was more clear. It's to have the error path indented an extra tab.
--- drivers/md/raid1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/md/raid1.c +1 -1
@@ -96,7 +96,7 @@ static void remove_wb(struct md_rdev *rdev, sector_t lo, sector_t hi) }if (!found) -WARN_ON ("The write behind IO is not recorded\n" ); +WARN (1 ,"The write behind IO is not recorded\n" );spin_unlock_irqrestore (&rdev->wb_list_lock, flags);wake_up (&rdev->wb_io_wait); }
Signature · 1 line
2.20.1
Song Liu
AppliedQuoted 6 lines · Dan Carpenter
The
WARN_ON()macro doesn't take an error message, it just takes a condition. I've changed this to useWARN(1, "...")instead.Fixes 3e148a320979 ("md/raid1: fix potential data inconsistency issue with write behind device")Signed-off-by Dan Carpenter <[email protected]>
Applied. Thanks for the fix.
Song