Commit 27d2e5e5 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] fs/inode.c list_head cleanup

Teach inode.c about list_move().
parent ed678f13
......@@ -216,10 +216,8 @@ void __iget(struct inode * inode)
return;
}
atomic_inc(&inode->i_count);
if (!(inode->i_state & (I_DIRTY|I_LOCK))) {
list_del(&inode->i_list);
list_add(&inode->i_list, &inode_in_use);
}
if (!(inode->i_state & (I_DIRTY|I_LOCK)))
list_move(&inode->i_list, &inode_in_use);
inodes_stat.nr_unused--;
}
......@@ -304,8 +302,7 @@ static int invalidate_list(struct list_head *head, struct super_block * sb, stru
invalidate_inode_buffers(inode);
if (!atomic_read(&inode->i_count)) {
hlist_del_init(&inode->i_hash);
list_del(&inode->i_list);
list_add(&inode->i_list, dispose);
list_move(&inode->i_list, dispose);
inode->i_state |= I_FREEING;
count++;
continue;
......@@ -1017,10 +1014,8 @@ static void generic_forget_inode(struct inode *inode)
struct super_block *sb = inode->i_sb;
if (!hlist_unhashed(&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)))
list_move(&inode->i_list, &inode_unused);
inodes_stat.nr_unused++;
spin_unlock(&inode_lock);
if (!sb || (sb->s_flags & MS_ACTIVE))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment