projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fs: icache RCU free inodes
[firefly-linux-kernel-4.4.55.git]
/
fs
/
exofs
/
super.c
diff --git
a/fs/exofs/super.c
b/fs/exofs/super.c
index 79c3ae6e045693ec5e7e8f91cf031309be175242..8c6c4669b381699d78b52e541c7ad59fd82a9c1b 100644
(file)
--- a/
fs/exofs/super.c
+++ b/
fs/exofs/super.c
@@
-150,12
+150,19
@@
static struct inode *exofs_alloc_inode(struct super_block *sb)
return &oi->vfs_inode;
}
return &oi->vfs_inode;
}
+static void exofs_i_callback(struct rcu_head *head)
+{
+ struct inode *inode = container_of(head, struct inode, i_rcu);
+ INIT_LIST_HEAD(&inode->i_dentry);
+ kmem_cache_free(exofs_inode_cachep, exofs_i(inode));
+}
+
/*
* Remove an inode from the cache
*/
static void exofs_destroy_inode(struct inode *inode)
{
/*
* Remove an inode from the cache
*/
static void exofs_destroy_inode(struct inode *inode)
{
-
kmem_cache_free(exofs_inode_cachep, exofs_i(inode)
);
+
call_rcu(&inode->i_rcu, exofs_i_callback
);
}
/*
}
/*