From: Shaohua Li Date: Tue, 25 Jul 2017 22:18:13 +0000 (-0700) Subject: MD: fix warnning for UP case X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ed9b66d21866ae3bf16557406258ebe6c00a9a84;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git MD: fix warnning for UP case spin_is_locked always returns 0 for UP case, so ignores it Reported-by: Joshua Kinard Signed-off-by: Shaohua Li --- diff --git a/drivers/md/md.c b/drivers/md/md.c index 8cdca0296749..c99634612fc4 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -2287,7 +2287,7 @@ static void export_array(struct mddev *mddev) static bool set_in_sync(struct mddev *mddev) { - WARN_ON_ONCE(!spin_is_locked(&mddev->lock)); + WARN_ON_ONCE(NR_CPUS != 1 && !spin_is_locked(&mddev->lock)); if (!mddev->in_sync) { mddev->sync_checkers++; spin_unlock(&mddev->lock);