mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] some more fixes for inode.c
@ 2004-01-20 13:06 Rik van Riel
  2004-01-20 13:46 ` David Woodhouse
  2004-01-30  3:55 ` Rusty Russell
  0 siblings, 2 replies; 4+ messages in thread
From: Rik van Riel @ 2004-01-20 13:06 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: David Woodhouse, linux-kernel

Hi Marcelo, David, 

when looking over the 2.4.25-pre6-rmap patch, I found two more
chunks in inode.c that might be needed/useful.  

The first chunk refiles the inode on the inode_unused_pagecache
list if needed, but I'm not 100% sure we need that change, since
maybe only completely unused inodes can end up here. David ?
It should be safe, though.

The second chunk make ssure to also remove the quota stuff for
inodes on the inode_unused_pagecache list, in the same way it
acts the other lists.


diff -Nru a/fs/inode.c b/fs/inode.c
--- a/fs/inode.c	Mon Jan 19 20:44:17 2004
+++ b/fs/inode.c	Mon Jan 19 20:44:17 2004
@@ -1234,10 +1235,8 @@
 				BUG();
 		} else {
 			if (!list_empty(&inode->i_hash)) {
-				if (!(inode->i_state & (I_DIRTY|I_LOCK))) {
-					list_del(&inode->i_list);
-					list_add(&inode->i_list, &inode_unused);
-				}
+				if (!(inode->i_state & (I_DIRTY|I_LOCK))) 
+					__refile_inode(inode);
 				inodes_stat.nr_unused++;
 				spin_unlock(&inode_lock);
 				if (!sb || (sb->s_flags & MS_ACTIVE))
@@ -1414,6 +1413,11 @@
 			remove_inode_dquot_ref(inode, type, &tofree_head);
 	}
 	list_for_each(act_head, &inode_unused) {
+		inode = list_entry(act_head, struct inode, i_list);
+		if (inode->i_sb == sb && IS_QUOTAINIT(inode))
+			remove_inode_dquot_ref(inode, type, &tofree_head);
+	}
+	list_for_each(act_head, &inode_unused_pagecache) {
 		inode = list_entry(act_head, struct inode, i_list);
 		if (inode->i_sb == sb && IS_QUOTAINIT(inode))
 			remove_inode_dquot_ref(inode, type, &tofree_head);


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-01-30  4:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-20 13:06 [PATCH] some more fixes for inode.c Rik van Riel
2004-01-20 13:46 ` David Woodhouse
2004-01-20 13:52   ` Rik van Riel
2004-01-30  3:55 ` Rusty Russell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®