Loading fs/btrfs/inode.c +1 −1 Original line number Diff line number Diff line Loading @@ -3849,7 +3849,7 @@ again: p = &root->inode_tree.rb_node; parent = NULL; if (hlist_unhashed(&inode->i_hash)) if (inode_unhashed(inode)) return; spin_lock(&root->inode_lock); Loading fs/fs-writeback.c +1 −1 Original line number Diff line number Diff line Loading @@ -962,7 +962,7 @@ void __mark_inode_dirty(struct inode *inode, int flags) * dirty list. Add blockdev inodes as well. */ if (!S_ISBLK(inode->i_mode)) { if (hlist_unhashed(&inode->i_hash)) if (inode_unhashed(inode)) goto out; } if (inode->i_state & I_FREEING) Loading fs/inode.c +3 −3 Original line number Diff line number Diff line Loading @@ -1094,7 +1094,7 @@ int insert_inode_locked(struct inode *inode) __iget(old); spin_unlock(&inode_lock); wait_on_inode(old); if (unlikely(!hlist_unhashed(&old->i_hash))) { if (unlikely(!inode_unhashed(old))) { iput(old); return -EBUSY; } Loading Loading @@ -1133,7 +1133,7 @@ int insert_inode_locked4(struct inode *inode, unsigned long hashval, __iget(old); spin_unlock(&inode_lock); wait_on_inode(old); if (unlikely(!hlist_unhashed(&old->i_hash))) { if (unlikely(!inode_unhashed(old))) { iput(old); return -EBUSY; } Loading Loading @@ -1186,7 +1186,7 @@ EXPORT_SYMBOL(generic_delete_inode); */ int generic_drop_inode(struct inode *inode) { return !inode->i_nlink || hlist_unhashed(&inode->i_hash); return !inode->i_nlink || inode_unhashed(inode); } EXPORT_SYMBOL_GPL(generic_drop_inode); Loading fs/reiserfs/xattr.c +1 −1 Original line number Diff line number Diff line Loading @@ -422,7 +422,7 @@ int reiserfs_commit_write(struct file *f, struct page *page, static void update_ctime(struct inode *inode) { struct timespec now = current_fs_time(inode->i_sb); if (hlist_unhashed(&inode->i_hash) || !inode->i_nlink || if (inode_unhashed(inode) || !inode->i_nlink || timespec_equal(&inode->i_ctime, &now)) return; Loading include/linux/fs.h +5 −0 Original line number Diff line number Diff line Loading @@ -786,6 +786,11 @@ struct inode { void *i_private; /* fs or device private pointer */ }; static inline int inode_unhashed(struct inode *inode) { return hlist_unhashed(&inode->i_hash); } /* * inode->i_mutex nesting subclasses for the lock validator: * Loading Loading
fs/btrfs/inode.c +1 −1 Original line number Diff line number Diff line Loading @@ -3849,7 +3849,7 @@ again: p = &root->inode_tree.rb_node; parent = NULL; if (hlist_unhashed(&inode->i_hash)) if (inode_unhashed(inode)) return; spin_lock(&root->inode_lock); Loading
fs/fs-writeback.c +1 −1 Original line number Diff line number Diff line Loading @@ -962,7 +962,7 @@ void __mark_inode_dirty(struct inode *inode, int flags) * dirty list. Add blockdev inodes as well. */ if (!S_ISBLK(inode->i_mode)) { if (hlist_unhashed(&inode->i_hash)) if (inode_unhashed(inode)) goto out; } if (inode->i_state & I_FREEING) Loading
fs/inode.c +3 −3 Original line number Diff line number Diff line Loading @@ -1094,7 +1094,7 @@ int insert_inode_locked(struct inode *inode) __iget(old); spin_unlock(&inode_lock); wait_on_inode(old); if (unlikely(!hlist_unhashed(&old->i_hash))) { if (unlikely(!inode_unhashed(old))) { iput(old); return -EBUSY; } Loading Loading @@ -1133,7 +1133,7 @@ int insert_inode_locked4(struct inode *inode, unsigned long hashval, __iget(old); spin_unlock(&inode_lock); wait_on_inode(old); if (unlikely(!hlist_unhashed(&old->i_hash))) { if (unlikely(!inode_unhashed(old))) { iput(old); return -EBUSY; } Loading Loading @@ -1186,7 +1186,7 @@ EXPORT_SYMBOL(generic_delete_inode); */ int generic_drop_inode(struct inode *inode) { return !inode->i_nlink || hlist_unhashed(&inode->i_hash); return !inode->i_nlink || inode_unhashed(inode); } EXPORT_SYMBOL_GPL(generic_drop_inode); Loading
fs/reiserfs/xattr.c +1 −1 Original line number Diff line number Diff line Loading @@ -422,7 +422,7 @@ int reiserfs_commit_write(struct file *f, struct page *page, static void update_ctime(struct inode *inode) { struct timespec now = current_fs_time(inode->i_sb); if (hlist_unhashed(&inode->i_hash) || !inode->i_nlink || if (inode_unhashed(inode) || !inode->i_nlink || timespec_equal(&inode->i_ctime, &now)) return; Loading
include/linux/fs.h +5 −0 Original line number Diff line number Diff line Loading @@ -786,6 +786,11 @@ struct inode { void *i_private; /* fs or device private pointer */ }; static inline int inode_unhashed(struct inode *inode) { return hlist_unhashed(&inode->i_hash); } /* * inode->i_mutex nesting subclasses for the lock validator: * Loading