27 pr_dinfo2(vfs,
"inode %p has 0 refcount and 0 nlinks, dropping", (
void *) inode);
35 if (inode->superblock->ops && inode->superblock->ops->drop_inode)
36 dropped = inode->superblock->ops->drop_inode(inode);
41 pr_warn(
"inode %p has 0 refcount and 0 nlinks, but failed to be dropped", (
void *) inode);
104 MOS_ASSERT_X(!dropped,
"inode %p was dropped accidentally, where dentry %p should be holding a reference", (
void *) inode, (
void *) dentry);
#define MOS_ASSERT_X(cond, msg,...)
#define MOS_INODE_CACHE_HASHMAP_SIZE
MOSAPI int __pure hashmap_simple_key_compare(uintn key1, uintn key2)
MOSAPI hash_t __pure hashmap_identity_hash(uintn key)
MOSAPI void hashmap_init(hashmap_t *map, size_t capacity, hashmap_hash_t hash_func, hashmap_key_compare_t compare_func)
static bool inode_try_drop(inode_t *inode)
inode_t * inode_create(superblock_t *sb, u64 ino, file_type_t type)
static bool vfs_generic_inode_drop(inode_t *inode)
void inode_ref(inode_t *inode)
void inode_init(inode_t *inode, superblock_t *sb, u64 ino, file_type_t type)
bool inode_unlink(inode_t *dir, dentry_t *dentry)
Unlink a dentry from its parent inode.
bool inode_unref(inode_t *inode)
long pagecache_flush_or_drop_all(inode_cache_t *icache, bool drop_page)
Flush or drop all pages in the page cache.
#define pr_dinfo2(feat, fmt,...)
#define mutex_acquire(mutex)
#define mutex_release(mutex)
#define SLAB_AUTOINIT(name, var, type)
bool(* unlink)(inode_t *dir, dentry_t *dentry)
remove a file name, this is called after nlinks is decremented
superblock_t * superblock
const file_ops_t * file_ops
atomic_t refcount
number of references to this inode