aboutsummaryrefslogtreecommitdiffstats
path: root/fs/afs/internal.h
diff options
context:
space:
mode:
authorJann Horn <jannh@google.com>2020-03-12 21:36:53 +0000
committerLinus Torvalds <torvalds@linux-foundation.org>2020-03-13 10:47:33 -0700
commitddd2b85ff73bb60061a9fb08ac1f5a03a2d4bce0 (patch)
treeb1855db26a095357cd1462c0eb9244a7e1e3a709 /fs/afs/internal.h
parentMerge tag 'drm-fixes-2020-03-13' of git://anongit.freedesktop.org/drm/drm (diff)
downloadlinux-dev-ddd2b85ff73bb60061a9fb08ac1f5a03a2d4bce0.tar.xz
linux-dev-ddd2b85ff73bb60061a9fb08ac1f5a03a2d4bce0.zip
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>
Diffstat (limited to '')
-rw-r--r--fs/afs/internal.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/afs/internal.h b/fs/afs/internal.h
index 1d81fc4c3058..35f951ac296f 100644
--- a/fs/afs/internal.h
+++ b/fs/afs/internal.h
@@ -81,7 +81,7 @@ enum afs_call_state {
* List of server addresses.
*/
struct afs_addr_list {
- struct rcu_head rcu; /* Must be first */
+ struct rcu_head rcu;
refcount_t usage;
u32 version; /* Version */
unsigned char max_addrs;