Skip to contentSkip to conversation

fix-nr_unused-accounting-and-avoid-recursing-in-iput-with-i_will_free-set.patch

PATCH Vladimir V. Saveliev 1 participant 1 message Oct 25, 2005 VFS

lore
Share & tools
lore
#0 lore raw

Hello

The patch mentioned in the subject checks I_WILL_FREE bit in inode->i_flags, while generic_forget_inode sets it in inode->i_state.
Is it really supposed to be so?
If not, does the attached patch look correct?

generic_forget_inode sets I_WILL_FREE bit in inode->i_state. __writeback_single_inode checks that bit in inode->i_flags. This patch changes __writeback_single_inode to check inode->i_state.

 fs/fs-writeback.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
fs/fs-writeback.c renamed from fs/fs-writeback.c~writeback_single_inode-warn-fix +2 -2
diff -puN fs/fs-writeback.c~writeback_single_inode-warn-fix fs/fs-writeback.c
@@ -248,9 +248,9 @@ __writeback_single_inode(struct inode *i
 	wait_queue_head_t *wqh;
 
 	if (!atomic_read(&inode->i_count))
-		WARN_ON(!(inode->i_flags & I_WILL_FREE));
+		WARN_ON(!(inode->i_state & I_WILL_FREE));
 	else
-		WARN_ON(inode->i_flags & I_WILL_FREE);
+		WARN_ON(inode->i_state & I_WILL_FREE);
 
 	if ((wbc->sync_mode != WB_SYNC_ALL) && (inode->i_state & I_LOCK)) {
 		list_move(&inode->i_list, &inode->i_sb->s_dirty);

_