/* Cache invalidation occurs rarely, thus the LRU chain is not updated. It fixes itself after a while.  */
static void __fat_cache_inval_inode(struct inode *inode)
/* Cache invalidation occurs rarely, thus the LRU chain is not updated. It fixes itself after a while.  */
static void __fat_cache_inval_inode(struct inode *inode)
{
	struct msdos_inode_info *i = MSDOS_I(inode);
	struct fat_cache *cache;
	while (!list_empty(&i->cache_lru)) {
		cache = list_entry(i->cache_lru.next, struct fat_cache, cache_list);
		list_del_init(&cache->cache_list);
		i->nr_caches--;
		fat_cache_free(cache);
	}
	i->cache_valid_id++;
	if (i->cache_valid_id == FAT_CACHE_VALID)
		i->cache_valid_id++;
}