From 97902a38295b1f154e9aade2f54427fdb66b3d93 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Thu, 14 Jun 2012 17:27:05 +0200 Subject: [PATCH] osx: Treat writer node as an internal buffer tree node. --- osx_write.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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); -- 2.39.2