X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;ds=sidebyside;f=ltt-relay-alloc.c;h=03a6ffa0e83827fccc58b19db953f762e7527e8c;hb=refs%2Fheads%2Fv0.19-stable;hp=6ff552efacc06cb5506f23090a34833533e5783e;hpb=13c601172bb6ede4e4595c718d96410173f933af;p=lttng-modules.git diff --git a/ltt-relay-alloc.c b/ltt-relay-alloc.c index 6ff552ef..03a6ffa0 100644 --- a/ltt-relay-alloc.c +++ b/ltt-relay-alloc.c @@ -360,7 +360,7 @@ void ltt_chan_alloc_remove_files(struct ltt_chan_alloc *chan) * Wait for every reference to the dentry to be gone, * except us. */ - while (atomic_read(&dentry->d_count) != 1) + while (ACCESS_ONCE(dentry->d_count) != 1) msleep(100); dput(dentry); } @@ -716,9 +716,14 @@ void *ltt_relay_offset_address(struct ltt_chanbuf_alloc *bufa, size_t offset) } EXPORT_SYMBOL_GPL(ltt_relay_offset_address); +static struct notifier_block ltt_relay_hotcpu = { + .notifier_call = ltt_relay_hotcpu_callback, + .priority = 5, +}; + static __init int ltt_relay_alloc_init(void) { - hotcpu_notifier(ltt_relay_hotcpu_callback, 5); + register_cpu_notifier(<t_relay_hotcpu); ltt_relay_init(); ltt_ascii_init(); return 0; @@ -728,6 +733,7 @@ static void __exit ltt_relay_alloc_exit(void) { ltt_ascii_exit(); ltt_relay_exit(); + unregister_cpu_notifier(<t_relay_hotcpu); } module_init(ltt_relay_alloc_init);