mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
libceph: using kfree_rcu() to simplify the code
The callback function of call_rcu() just calls a kfree(), so we can use kfree_rcu() instead of call_rcu() + callback function. Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: Ilya Dryomov <[email protected]>
This commit is contained in:
parent
f52ec33cbd
commit
864364a29c
1 changed files with 1 additions and 7 deletions
|
|
@ -84,12 +84,6 @@ retry:
|
|||
}
|
||||
EXPORT_SYMBOL(ceph_find_or_create_string);
|
||||
|
||||
static void ceph_free_string(struct rcu_head *head)
|
||||
{
|
||||
struct ceph_string *cs = container_of(head, struct ceph_string, rcu);
|
||||
kfree(cs);
|
||||
}
|
||||
|
||||
void ceph_release_string(struct kref *ref)
|
||||
{
|
||||
struct ceph_string *cs = container_of(ref, struct ceph_string, kref);
|
||||
|
|
@ -101,7 +95,7 @@ void ceph_release_string(struct kref *ref)
|
|||
}
|
||||
spin_unlock(&string_tree_lock);
|
||||
|
||||
call_rcu(&cs->rcu, ceph_free_string);
|
||||
kfree_rcu(cs, rcu);
|
||||
}
|
||||
EXPORT_SYMBOL(ceph_release_string);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue