From: Andre Noll Date: Thu, 14 Jun 2012 15:27:05 +0000 (+0200) Subject: osx: Treat writer node as an internal buffer tree node. X-Git-Tag: v0.4.12~8^2~2 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=97902a38295b1f154e9aade2f54427fdb66b3d93 osx: Treat writer node as an internal buffer tree node. --- diff --git a/osx_write.c b/osx_write.c index e34f0388..73aa1377 100644 --- a/osx_write.c +++ b/osx_write.c @@ -285,7 +285,7 @@ static void osx_write_pre_select(struct sched *s, struct task *t) } mutex_lock(powd->mutex); - ret = btr_node_status(wn->btrn, wn->min_iqs, BTR_NT_LEAF); + ret = btr_node_status(wn->btrn, wn->min_iqs, BTR_NT_INTERNAL); if (ret < 0) drain_delay_nec = need_drain_delay(powd); mutex_unlock(powd->mutex); @@ -317,8 +317,9 @@ static void osx_write_post_select(__a_unused struct sched *s, struct task *t) AudioOutputUnitStart(powd->audio_unit); } mutex_lock(powd->mutex); - btr_pushdown(btrn); - ret = btr_node_status(btrn, wn->min_iqs, BTR_NT_LEAF); + ret = btr_node_status(btrn, wn->min_iqs, BTR_NT_INTERNAL); + if (ret > 0) + btr_pushdown(btrn); if (ret < 0 && need_drain_delay(powd)) ret = 0; mutex_unlock(powd->mutex);