-
- /*
- * We dropped and reaquired the lock, check
- * state again.
- */
- if (!flist_empty(&sw->work_list))
- goto handle_work;
-
+ }
+ /*
+ * We may have dropped and reaquired the lock, check state
+ * again.
+ */
+ if (flist_empty(&sw->work_list)) {
flist_splice_init(&sw->work_list, &local_list);
}
pthread_mutex_unlock(&sw->lock);
handle_list(sw, &local_list);
if (wq->ops.update_acct_fn)
wq->ops.update_acct_fn(sw);
flist_splice_init(&sw->work_list, &local_list);
}
pthread_mutex_unlock(&sw->lock);
handle_list(sw, &local_list);
if (wq->ops.update_acct_fn)
wq->ops.update_acct_fn(sw);