Commit ed9b66d2 authored by Shaohua Li's avatar Shaohua Li

MD: fix warnning for UP case

spin_is_locked always returns 0 for UP case, so ignores it
Reported-by: default avatarJoshua Kinard <kumba@gentoo.org>
Signed-off-by: default avatarShaohua Li <shli@fb.com>
parent 7e96d559
...@@ -2287,7 +2287,7 @@ static void export_array(struct mddev *mddev) ...@@ -2287,7 +2287,7 @@ static void export_array(struct mddev *mddev)
static bool set_in_sync(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) { if (!mddev->in_sync) {
mddev->sync_checkers++; mddev->sync_checkers++;
spin_unlock(&mddev->lock); spin_unlock(&mddev->lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment