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.

fs: move wait_on_inode() from writeback.h to fs.h

The only consumer outside of fs/inode.c is gfs2 and it already includes
fs.h in the relevant file.

Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>

authored by

Mateusz Guzik and committed by
Christian Brauner
af6023e2 31e332b9

+10 -11
+10
include/linux/fs.h
··· 949 949 hlist_add_fake(&inode->i_hash); 950 950 } 951 951 952 + static inline void wait_on_inode(struct inode *inode) 953 + { 954 + wait_var_event(inode_state_wait_address(inode, __I_NEW), 955 + !(READ_ONCE(inode->i_state) & I_NEW)); 956 + /* 957 + * Pairs with routines clearing I_NEW. 958 + */ 959 + smp_rmb(); 960 + } 961 + 952 962 /* 953 963 * inode->i_rwsem nesting subclasses for the lock validator: 954 964 *
-11
include/linux/writeback.h
··· 189 189 void inode_wait_for_writeback(struct inode *inode); 190 190 void inode_io_list_del(struct inode *inode); 191 191 192 - /* writeback.h requires fs.h; it, too, is not included from here. */ 193 - static inline void wait_on_inode(struct inode *inode) 194 - { 195 - wait_var_event(inode_state_wait_address(inode, __I_NEW), 196 - !(READ_ONCE(inode->i_state) & I_NEW)); 197 - /* 198 - * Pairs with routines clearing I_NEW. 199 - */ 200 - smp_rmb(); 201 - } 202 - 203 192 #ifdef CONFIG_CGROUP_WRITEBACK 204 193 205 194 #include <linux/cgroup.h>