int blocksize = fs->prime_sb->s_blocksize;
if (wc->seg.dev < 0) {
wc->remaining = 0;
- wc->chead = NULL;
wc->chead_size = 0;
return;
}
wc->chead_blocks = 1;
wc->remaining--;
wc->cluster_space = blocksize - sizeof(struct cluster_head);
- wc->chead_size = sizeof(struct cluster_head);
-
- wc->pending_next = (wc->pending_next+1) % 4;
wc->chead = page_address(wc->page[wc->pending_next]);
-
+ wc->chead_size = sizeof(struct cluster_head);
}
static void close_segment(struct fs *fs, int cnum)
}
dprintk("D %d\n", wake);
+ wc->pending_next = (wc->pending_next+1) % 4;
/* now re-initialise the cluster information */
cluster_reset(fs, wc);
INIT_LIST_HEAD(&wc->clhead);
for (i = 0; i < 4 ; i++) {
+ wc->pending_vfy_type[i] = VerifyNull;
+ atomic_set(&wc->pending_cnt[i], 0);
wc->page[i] = alloc_page(GFP_KERNEL);
if (!wc->page[i])
break;
}
return -ENOMEM;
}
- wc->pending_next = -1;
+ wc->pending_next = 0;
wc->cluster_seq = seq;
wc->prev_addr = prev;