md/raid1: Fix a warning message in remove_wb()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 26 Jun 2019 09:42:51 +0000 (12:42 +0300)
committerSong Liu <songliubraving@fb.com>
Wed, 26 Jun 2019 19:18:48 +0000 (12:18 -0700)
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 <dan.carpenter@oracle.com>
Signed-off-by: Song Liu <songliubraving@fb.com>
drivers/md/raid1.c

index 3d44da6637973963954c19560d5f38685c5949fa..34e26834ad28bd15ab18a216ed324bf0aab090dc 100644 (file)
@@ -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);
 }