libntfs: Add assertion that the entry is not already in the cache.
There is a big scary warning about this, but no code actually checks for it. This would have saved me some time in development...
This commit is contained in:
@@ -534,6 +534,12 @@ int ntfs_inode_close(ntfs_inode *ni)
|
|||||||
item.pathname = (const char*)NULL;
|
item.pathname = (const char*)NULL;
|
||||||
item.varsize = 0;
|
item.varsize = 0;
|
||||||
debug_cached_inode(ni);
|
debug_cached_inode(ni);
|
||||||
|
#if defined(__HAIKU__)
|
||||||
|
if (ntfs_fetch_cache(ni->vol->nidata_cache,
|
||||||
|
GENERIC(&item), idata_cache_compare)) {
|
||||||
|
panic("ntfs_inode_close: %llu already in cache!", ni->mft_no);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
ntfs_enter_cache(ni->vol->nidata_cache,
|
ntfs_enter_cache(ni->vol->nidata_cache,
|
||||||
GENERIC(&item), idata_cache_compare);
|
GENERIC(&item), idata_cache_compare);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user