X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=ltt-ascii.c;h=ad128e8bcd4708bd3288f4f0184bd0549ea1b77e;hb=refs%2Fheads%2Fv0.19-stable;hp=ed3c20d58dfa23df49340b70e0de25bbedc7d0a3;hpb=13c601172bb6ede4e4595c718d96410173f933af;p=lttng-modules.git diff --git a/ltt-ascii.c b/ltt-ascii.c index ed3c20d5..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); } @@ -568,7 +568,6 @@ EXPORT_SYMBOL_GPL(ltt_ascii_remove_dir); __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; } @@ -576,6 +575,7 @@ __init int ltt_ascii_init(void) __exit void ltt_ascii_exit(void) { debugfs_remove(ltt_ascii_dir_dentry); + put_ltt_root(); } MODULE_LICENSE("GPL and additional rights");