X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=ltt-ascii.c;h=ad128e8bcd4708bd3288f4f0184bd0549ea1b77e;hb=refs%2Fheads%2Fv0.19-stable;hp=975f94ad157d16b32da47ef89f136701bc057b16;hpb=1c8284ebdbd119314b8f01e442e64cf5fd4b9fe6;p=lttng-modules.git diff --git a/ltt-ascii.c b/ltt-ascii.c index 975f94ad..ad128e8b 100644 --- a/ltt-ascii.c +++ b/ltt-ascii.c @@ -543,7 +543,7 @@ void ltt_ascii_remove(struct ltt_chan *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); } @@ -565,22 +565,19 @@ void ltt_ascii_remove_dir(struct ltt_trace *trace) } EXPORT_SYMBOL_GPL(ltt_ascii_remove_dir); -static __init int ltt_ascii_init(void) +__init int ltt_ascii_init(void) { ltt_ascii_dir_dentry = debugfs_create_dir(LTT_ASCII, get_ltt_root()); - put_ltt_root(); return ltt_ascii_dir_dentry ? 0 : -EFAULT; } -static __exit void ltt_ascii_exit(void) +__exit void ltt_ascii_exit(void) { debugfs_remove(ltt_ascii_dir_dentry); + put_ltt_root(); } -module_init(ltt_ascii_init); -module_exit(ltt_ascii_exit); - MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Lai Jiangshan@FNST and Mathieu Desnoyers"); MODULE_DESCRIPTION("Linux Trace Toolkit Next Generation Ascii Converter");