summaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorShaohua Li <shli@fb.com>2017-07-26 00:18:13 +0200
committerShaohua Li <shli@fb.com>2017-07-26 00:18:13 +0200
commited9b66d21866ae3bf16557406258ebe6c00a9a84 (patch)
tree28f0932ec4d1a83213144575ce3f86feda169572 /drivers/md
parentmd/raid5: add thread_group worker async_tx_issue_pending_all (diff)
downloadlinux-ed9b66d21866ae3bf16557406258ebe6c00a9a84.tar.xz
linux-ed9b66d21866ae3bf16557406258ebe6c00a9a84.zip
MD: fix warnning for UP case
spin_is_locked always returns 0 for UP case, so ignores it Reported-by: Joshua Kinard <kumba@gentoo.org> Signed-off-by: Shaohua Li <shli@fb.com>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/md.c2
1 files changed, 1 insertions, 1 deletions
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);