Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: Kent Overstreet <kent.overstreet@linux.dev>

+8 -9
-8
fs/inode.c
··· 439 439 } 440 440 441 441 /* 442 - * inode->i_lock must be held 443 - */ 444 - void __iget(struct inode *inode) 445 - { 446 - atomic_inc(&inode->i_count); 447 - } 448 - 449 - /* 450 442 * get additional reference to inode; caller must already hold one. 451 443 */ 452 444 void ihold(struct inode *inode)
+8 -1
include/linux/fs.h
··· 3094 3094 return (u32)ino == 0; 3095 3095 } 3096 3096 3097 - extern void __iget(struct inode * inode); 3097 + /* 3098 + * inode->i_lock must be held 3099 + */ 3100 + static inline void __iget(struct inode *inode) 3101 + { 3102 + atomic_inc(&inode->i_count); 3103 + } 3104 + 3098 3105 extern void iget_failed(struct inode *); 3099 3106 extern void clear_inode(struct inode *); 3100 3107 extern void __destroy_inode(struct inode *);