We only need io_wake when we unlock or clear writeback, and neither of
those happen here so discard the call, put in a 'break' instead and
turn the (hard to read) do loop into a for loop.
Signed-off-by: NeilBrown <neilb@suse.de>
getref(b, MKREF(cluster)); /* we soon own a reference in the list */
- do {
+ for (;;) {
int avail;
/* see how much room is in cluster.
* The interesting values are:
used = cluster_insert(&wc->slhead, &wc->clhead, b, avail);
if (used >= 0)
- lafs_io_wake(b);
+ break;
else if (wc->slhead.b)
cluster_flush(fs, cnum);
else {
return -ENOSPC;
}
}
-
- } while (used < 0);
+ }
if (used > 0)
wc->cluster_space -= sizeof(struct descriptor);