- if (cur_flist->next) {
- flist = first_flist->prev; /* the newest flist */
- future_cnt = flist->ndx_end - cur_flist->next->ndx_start + 1;
- } else
- future_cnt = 0;
- while (future_cnt < at_least) {
+ old_cnt = cur_flist->used;
+ for (flist = first_flist; flist != cur_flist; flist = flist->next)
+ old_cnt += flist->used;
+ while (file_total - old_cnt < at_least) {