static void logfs_destroy_inode(struct inode *inode) { struct logfs_inode *li = logfs_inode(inode); BUG_ON(list_empty(&li->li_freeing_list)); spin_lock(&logfs_inode_lock); li->li_refcount--; if (li->li_refcount == 0) __logfs_destroy_inode(inode); spin_unlock(&logfs_inode_lock); }
static void logfs_destroy_inode(struct inode *inode) { struct logfs_inode *li = logfs_inode(inode); if (inode->i_ino < LOGFS_RESERVED_INOS) { /* * The reserved inodes are never destroyed unless we are in * unmont path. */ __logfs_destroy_meta_inode(inode); return; } BUG_ON(list_empty(&li->li_freeing_list)); spin_lock(&logfs_inode_lock); li->li_refcount--; if (li->li_refcount == 0) __logfs_destroy_inode(inode); spin_unlock(&logfs_inode_lock); }