inode.c (ext2fs_flush_icache): Add new function ext2fs_flush_icache()
which flushes the internal inode cache. Applications which modify the
inode table blocks directly must call this function.
+2000-11-01 <tytso@snap.thunk.org>
+
+ * inode.c (ext2fs_flush_icache): Add new function
+ ext2fs_flush_icache() which flushes the internal inode
+ cache. Applications which modify the inode table blocks
+ directly must call this function.
+
2000-10-26 <tytso@snap.thunk.org>
* mkjournal.c: Add #include of netinet/in.h, since Solaris
int reserved[6];
};
+/*
+ * This routine flushes the icache, if it exists.
+ */
+errcode_t ext2fs_flush_icache(ext2_filsys fs)
+{
+ int i;
+
+ if (!fs->icache)
+ return 0;
+
+ for (i=0; i < fs->icache->cache_size; i++)
+ fs->icache->cache[i].ino = 0;
+
+ return 0;
+}
+
static errcode_t create_icache(ext2_filsys fs)
{
errcode_t retval;
- int i;
if (fs->icache)
return 0;
ext2fs_free_mem((void **) &fs->icache);
return retval;
}
- for (i=0; i < fs->icache->cache_size; i++)
- fs->icache->cache[i].ino = 0;
+ ext2fs_flush_icache(fs);
return 0;
}