]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - osx_write.c
osx: Treat writer node as an internal buffer tree node.
[paraslash.git] / osx_write.c
index e34f03888c800ba5e157c89a4cc011aa66fc9469..73aa137732a61c57cab41a2f9f1532008ae652c9 100644 (file)
@@ -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);