Commit e24e960c authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Ingo Molnar

sched/wait, fs/ocfs2: Convert wait_on_atomic_t() usage to the new wait_var_event() API

The old wait_on_atomic_t() is going to get removed, use the more
flexible wait_var_event() API instead.

No change in functionality.
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 723c921e
...@@ -134,9 +134,10 @@ ocfs2_filecheck_sysfs_free(struct ocfs2_filecheck_sysfs_entry *entry) ...@@ -134,9 +134,10 @@ ocfs2_filecheck_sysfs_free(struct ocfs2_filecheck_sysfs_entry *entry)
{ {
struct ocfs2_filecheck_entry *p; struct ocfs2_filecheck_entry *p;
if (!atomic_dec_and_test(&entry->fs_count)) if (!atomic_dec_and_test(&entry->fs_count)) {
wait_on_atomic_t(&entry->fs_count, atomic_t_wait, wait_var_event(&entry->fs_count,
TASK_UNINTERRUPTIBLE); !atomic_read(&entry->fs_count));
}
spin_lock(&entry->fs_fcheck->fc_lock); spin_lock(&entry->fs_fcheck->fc_lock);
while (!list_empty(&entry->fs_fcheck->fc_head)) { while (!list_empty(&entry->fs_fcheck->fc_head)) {
...@@ -183,7 +184,7 @@ static void ...@@ -183,7 +184,7 @@ static void
ocfs2_filecheck_sysfs_put(struct ocfs2_filecheck_sysfs_entry *entry) ocfs2_filecheck_sysfs_put(struct ocfs2_filecheck_sysfs_entry *entry)
{ {
if (atomic_dec_and_test(&entry->fs_count)) if (atomic_dec_and_test(&entry->fs_count))
wake_up_atomic_t(&entry->fs_count); wake_up_var(&entry->fs_count);
} }
static struct ocfs2_filecheck_sysfs_entry * static struct ocfs2_filecheck_sysfs_entry *
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment