mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-01-11 17:10:13 +00:00
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>
This commit is contained in:
parent
31e332b911
commit
af6023e2ce
@ -949,6 +949,16 @@ static inline void inode_fake_hash(struct inode *inode)
|
||||
hlist_add_fake(&inode->i_hash);
|
||||
}
|
||||
|
||||
static inline void wait_on_inode(struct inode *inode)
|
||||
{
|
||||
wait_var_event(inode_state_wait_address(inode, __I_NEW),
|
||||
!(READ_ONCE(inode->i_state) & I_NEW));
|
||||
/*
|
||||
* Pairs with routines clearing I_NEW.
|
||||
*/
|
||||
smp_rmb();
|
||||
}
|
||||
|
||||
/*
|
||||
* inode->i_rwsem nesting subclasses for the lock validator:
|
||||
*
|
||||
|
||||
@ -189,17 +189,6 @@ void wakeup_flusher_threads_bdi(struct backing_dev_info *bdi,
|
||||
void inode_wait_for_writeback(struct inode *inode);
|
||||
void inode_io_list_del(struct inode *inode);
|
||||
|
||||
/* writeback.h requires fs.h; it, too, is not included from here. */
|
||||
static inline void wait_on_inode(struct inode *inode)
|
||||
{
|
||||
wait_var_event(inode_state_wait_address(inode, __I_NEW),
|
||||
!(READ_ONCE(inode->i_state) & I_NEW));
|
||||
/*
|
||||
* Pairs with routines clearing I_NEW.
|
||||
*/
|
||||
smp_rmb();
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CGROUP_WRITEBACK
|
||||
|
||||
#include <linux/cgroup.h>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user