lkml.org 
[lkml]   [2004]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] some more fixes for inode.c
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);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:00    [W:0.037 / U:0.804 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site