diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2018-06-29 19:36:57 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2018-08-03 16:03:32 -0400 |
commit | 5bef915104f32c9d0bb5df6e86a98e31cb524e9a (patch) | |
tree | 51c6c5bbbd4cd30d9d6dc65f8c78999d6eca9754 /include/linux/fs.h | |
parent | e950564b97fd0f541b02eb207685d0746f5ecf29 (diff) |
new helper: inode_fake_hash()
open-coded in a quite a few places...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index a42600565925..43941e230e2b 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -685,6 +685,17 @@ static inline int inode_unhashed(struct inode *inode) } /* + * __mark_inode_dirty expects inodes to be hashed. Since we don't + * want special inodes in the fileset inode space, we make them + * appear hashed, but do not put on any lists. hlist_del() + * will work fine and require no locking. + */ +static inline void inode_fake_hash(struct inode *inode) +{ + hlist_add_fake(&inode->i_hash); +} + +/* * inode->i_mutex nesting subclasses for the lock validator: * * 0: the object of the current VFS operation |