* reference count reaches 0, it is unlinked from the lookup table. If,
* furthermore, the entry has no opened file descriptors associated with it, the
* entry is freed. */
-struct lookup_table_entry *
-lte_decrement_refcnt(struct lookup_table_entry *lte, struct lookup_table *table)
+void lte_decrement_refcnt(struct lookup_table_entry *lte,
+ struct lookup_table *table)
{
wimlib_assert(lte);
wimlib_assert(lte->refcnt);
#ifdef WITH_FUSE
if (lte->num_opened_fds == 0)
#endif
- {
finalize_lte(lte);
- lte = NULL;
- }
}
- return lte;
}
#ifdef WITH_FUSE
-struct lookup_table_entry *
-lte_decrement_num_opened_fds(struct lookup_table_entry *lte,
- struct lookup_table *table)
+void lte_decrement_num_opened_fds(struct lookup_table_entry *lte,
+ struct lookup_table *table)
{
- if (lte) {
- wimlib_assert(lte->num_opened_fds);
- if (--lte->num_opened_fds == 0 && lte->refcnt == 0) {
- lookup_table_unlink(table, lte);
- finalize_lte(lte);
- lte = NULL;
- }
- }
- return lte;
+ wimlib_assert(lte);
+ wimlib_assert(lte->num_opened_fds);
+ if (--lte->num_opened_fds == 0 && lte->refcnt == 0)
+ finalize_lte(lte);
}
#endif
* data stream in one of the alternate data streams instead of inside the WIM
* dentry itself. So we need to check the alternate data streams too.
*
- * Also, note that a dentry may appear to have than one unnamed stream, but if
- * the SHA1 message digest is all 0's then the corresponding stream does not
+ * Also, note that a dentry may appear to have more than one unnamed stream, but
+ * if the SHA1 message digest is all 0's then the corresponding stream does not
* really "count" (this is the case for the inode's own file stream when the
* file stream that should be there is actually in one of the alternate stream
* entries.). This is despite the fact that we may need to extract such a