]> git.baikalelectronics.ru Git - kernel.git/commit
afs: Use kfree_rcu() instead of casting kfree() to rcu_callback_t
authorJann Horn <jannh@google.com>
Thu, 12 Mar 2020 21:36:53 +0000 (21:36 +0000)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 13 Mar 2020 17:47:33 +0000 (10:47 -0700)
commit2b1def92429bb32b471fbf5fd451df8ede50749d
treeb1855db26a095357cd1462c0eb9244a7e1e3a709
parent7484fb17b369eb8b352ff263790631b8d8388b76
afs: Use kfree_rcu() instead of casting kfree() to rcu_callback_t

afs_put_addrlist() casts kfree() to rcu_callback_t. Apart from being wrong
in theory, this might also blow up when people start enforcing function
types via compiler instrumentation, and it means the rcu_head has to be
first in struct afs_addr_list.

Use kfree_rcu() instead, it's simpler and more correct.

Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/afs/addr_list.c
fs/afs/internal.h