/* First let's see if we need to grab a prioritised block */
if (dev->has_pending_prioritised_gc && !aggressive) {
dev->gc_dirtiest = 0;
/* First let's see if we need to grab a prioritised block */
if (dev->has_pending_prioritised_gc && !aggressive) {
dev->gc_dirtiest = 0;
result = yaffs_rd_chunk_tags_nand(dev, in->hdr_chunk, buf, &tags);
result = yaffs_rd_chunk_tags_nand(dev, in->hdr_chunk, buf, &tags);
if (yaffs_init_nand(dev) != YAFFS_OK) {
yaffs_trace(YAFFS_TRACE_ALWAYS, "InitialiseNAND failed");
return YAFFS_FAIL;
}
if (yaffs_init_nand(dev) != YAFFS_OK) {
yaffs_trace(YAFFS_TRACE_ALWAYS, "InitialiseNAND failed");
return YAFFS_FAIL;
}
n_free = dev->n_free_chunks;
n_free += dev->n_deleted_files;
/* Now count and subtract the number of dirty chunks in the cache. */
n_free = dev->n_free_chunks;
n_free += dev->n_deleted_files;
/* Now count and subtract the number of dirty chunks in the cache. */