mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-11-17 12:14:43 +00:00
fs/inode.c:evict() doesn't care about delete vs. non-delete paths now
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
07958f9f5b
commit
644da5960d
1 changed files with 4 additions and 4 deletions
|
|
@ -329,7 +329,7 @@ void clear_inode(struct inode *inode)
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(clear_inode);
|
EXPORT_SYMBOL(clear_inode);
|
||||||
|
|
||||||
static void evict(struct inode *inode, int delete)
|
static void evict(struct inode *inode)
|
||||||
{
|
{
|
||||||
const struct super_operations *op = inode->i_sb->s_op;
|
const struct super_operations *op = inode->i_sb->s_op;
|
||||||
|
|
||||||
|
|
@ -363,7 +363,7 @@ static void dispose_list(struct list_head *head)
|
||||||
inode = list_first_entry(head, struct inode, i_list);
|
inode = list_first_entry(head, struct inode, i_list);
|
||||||
list_del(&inode->i_list);
|
list_del(&inode->i_list);
|
||||||
|
|
||||||
evict(inode, 0);
|
evict(inode);
|
||||||
|
|
||||||
spin_lock(&inode_lock);
|
spin_lock(&inode_lock);
|
||||||
hlist_del_init(&inode->i_hash);
|
hlist_del_init(&inode->i_hash);
|
||||||
|
|
@ -1224,7 +1224,7 @@ void generic_delete_inode(struct inode *inode)
|
||||||
inodes_stat.nr_inodes--;
|
inodes_stat.nr_inodes--;
|
||||||
spin_unlock(&inode_lock);
|
spin_unlock(&inode_lock);
|
||||||
|
|
||||||
evict(inode, 1);
|
evict(inode);
|
||||||
|
|
||||||
spin_lock(&inode_lock);
|
spin_lock(&inode_lock);
|
||||||
hlist_del_init(&inode->i_hash);
|
hlist_del_init(&inode->i_hash);
|
||||||
|
|
@ -1279,7 +1279,7 @@ static void generic_forget_inode(struct inode *inode)
|
||||||
{
|
{
|
||||||
if (!generic_detach_inode(inode))
|
if (!generic_detach_inode(inode))
|
||||||
return;
|
return;
|
||||||
evict(inode, 0);
|
evict(inode);
|
||||||
wake_up_inode(inode);
|
wake_up_inode(inode);
|
||||||
destroy_inode(inode);
|
destroy_inode(inode);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue