From b3a62948c1e19f6d893d12c8627d2cf67c1a5457 Mon Sep 17 00:00:00 2001 From: Jan Kara Date: Tue, 21 Apr 2020 10:54:44 +0200 Subject: [PATCH 2685/2944] writeback: Export inode_io_list_del() fix #34070914 commit 4301efa4c7cca11556dd89899eee066d49b47bf7 upstream. Ext4 needs to remove inode from writeback lists after it is out of visibility of its journalling machinery (which can still dirty the inode). Export inode_io_list_del() for it. Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20200421085445.5731-3-jack@suse.cz Signed-off-by: Theodore Ts'o Signed-off-by: Joseph Qi Reviewed-by: Xiaoguang Wang --- fs/fs-writeback.c | 1 + fs/internal.h | 2 -- include/linux/writeback.h | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 8ea937d..5df237b 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -1054,6 +1054,7 @@ void inode_io_list_del(struct inode *inode) inode_io_list_del_locked(inode, wb); spin_unlock(&wb->list_lock); } +EXPORT_SYMBOL(inode_io_list_del); /* * mark an inode as under writeback on the sb diff --git a/fs/internal.h b/fs/internal.h index 3a7af8f..44890c3 100644 --- a/fs/internal.h +++ b/fs/internal.h @@ -144,8 +144,6 @@ int do_fchownat(int dfd, const char __user *filename, uid_t user, gid_t group, /* * fs-writeback.c */ -extern void inode_io_list_del(struct inode *inode); - extern long get_nr_dirty_inodes(void); extern int invalidate_inodes(struct super_block *, bool); diff --git a/include/linux/writeback.h b/include/linux/writeback.h index d8d7ecb..7d52ed7 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h @@ -173,6 +173,7 @@ void writeback_inodes_sb_nr(struct super_block *, unsigned long nr, void wakeup_flusher_threads_bdi(struct backing_dev_info *bdi, enum wb_reason reason); 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) -- 1.8.3.1