Remove inode from writeback list only after waiting for flusher work do be done with it (I_SYNC is cleared). Currently it makes no difference but later we will depend on the fact that while inode has I_SYNC set, it is pinned in the dirty writeback list. Signed-off-by: Jan Kara <jack@xxxxxxx> --- fs/inode.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/inode.c b/fs/inode.c index f96d2a6f88cc..1be1fb73527c 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -533,9 +533,6 @@ static void evict(struct inode *inode) BUG_ON(!(inode->i_state & I_FREEING)); BUG_ON(!list_empty(&inode->i_lru)); - if (!list_empty(&inode->i_wb_list)) - inode_wb_list_del(inode); - inode_sb_list_del(inode); /* @@ -545,6 +542,8 @@ static void evict(struct inode *inode) * the inode. We just have to wait for running writeback to finish. */ inode_wait_for_writeback(inode); + if (!list_empty(&inode->i_wb_list)) + inode_wb_list_del(inode); if (op->evict_inode) { op->evict_inode(inode); -- 1.8.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html