new helper: inode_unhashed()

note: for race-free uses you inode_lock held

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro
2010-10-23 15:19:20 -04:00
parent a8dade34e3
commit 1d3382cbf0
6 changed files with 13 additions and 8 deletions

View File

@@ -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)