summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoris Protopopov <[email protected]>2017-06-26 17:36:49 -0400
committerBrian Behlendorf <[email protected]>2017-06-26 14:36:49 -0700
commit03928896e114cfc4752c089727474134a2b0204b (patch)
treec5c454469742a26b1844f64e79e033fd4813512f
parent7e35ea783e55eaa4f0721d34077652b874f979d8 (diff)
Call cv_signal() with mutex held
In bqueue_dequeue(), call cv_signal() with bq_lock held. Re-enable rsend_009_pos to test the fix. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Boris Protopopov <[email protected]> Closes #5887
-rw-r--r--module/zfs/bqueue.c2
-rw-r--r--tests/runfiles/linux.run3
2 files changed, 2 insertions, 3 deletions
diff --git a/module/zfs/bqueue.c b/module/zfs/bqueue.c
index 0e490805c..f30253d24 100644
--- a/module/zfs/bqueue.c
+++ b/module/zfs/bqueue.c
@@ -97,8 +97,8 @@ bqueue_dequeue(bqueue_t *q)
ASSERT3P(ret, !=, NULL);
item_size = obj2node(q, ret)->bqn_size;
q->bq_size -= item_size;
- mutex_exit(&q->bq_lock);
cv_signal(&q->bq_add_cv);
+ mutex_exit(&q->bq_lock);
return (ret);
}
diff --git a/tests/runfiles/linux.run b/tests/runfiles/linux.run
index a0d89f277..e10ec4dc2 100644
--- a/tests/runfiles/linux.run
+++ b/tests/runfiles/linux.run
@@ -482,10 +482,9 @@ tests = ['reservation_001_pos', 'reservation_002_pos', 'reservation_003_pos',
tests = ['rootpool_002_neg', 'rootpool_003_neg', 'rootpool_007_pos']
# rsend_008_pos - https://github.com/zfsonlinux/zfs/issues/6066
-# rsend_009_pos - https://github.com/zfsonlinux/zfs/issues/5887
[tests/functional/rsend]
tests = ['rsend_001_pos', 'rsend_002_pos', 'rsend_003_pos', 'rsend_004_pos',
- 'rsend_005_pos', 'rsend_006_pos', 'rsend_007_pos',
+ 'rsend_005_pos', 'rsend_006_pos', 'rsend_007_pos', 'rsend_009_pos',
'rsend_010_pos', 'rsend_011_pos', 'rsend_012_pos',
'rsend_013_pos', 'rsend_014_pos',
'rsend_019_pos', 'rsend_020_pos',