Commit 88d2ae0e authored by Kent Overstreet's avatar Kent Overstreet

inode: make __iget() a static inline

bcachefs is switching to an rhashtable for vfs inodes instead of the
standard inode.c hashtable, so we need this exported, or - a static
inline makes more sense for a single atomic_inc().
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 27663d77
...@@ -438,14 +438,6 @@ static void init_once(void *foo) ...@@ -438,14 +438,6 @@ static void init_once(void *foo)
inode_init_once(inode); inode_init_once(inode);
} }
/*
* inode->i_lock must be held
*/
void __iget(struct inode *inode)
{
atomic_inc(&inode->i_count);
}
/* /*
* get additional reference to inode; caller must already hold one. * get additional reference to inode; caller must already hold one.
*/ */
......
...@@ -3094,7 +3094,14 @@ static inline bool is_zero_ino(ino_t ino) ...@@ -3094,7 +3094,14 @@ static inline bool is_zero_ino(ino_t ino)
return (u32)ino == 0; return (u32)ino == 0;
} }
extern void __iget(struct inode * inode); /*
* inode->i_lock must be held
*/
static inline void __iget(struct inode *inode)
{
atomic_inc(&inode->i_count);
}
extern void iget_failed(struct inode *); extern void iget_failed(struct inode *);
extern void clear_inode(struct inode *); extern void clear_inode(struct inode *);
extern void __destroy_inode(struct inode *); extern void __destroy_inode(struct inode *);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment