lkml.org 
[lkml]   [2018]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 08/11] sched/wait,ocfs2: Replace wait_on_atomic_t usage
Convert the wait_on_atomic_t() usage to the new wait_var_event() API.

Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
---
fs/ocfs2/filecheck.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)

--- a/fs/ocfs2/filecheck.c
+++ b/fs/ocfs2/filecheck.c
@@ -134,9 +134,10 @@ ocfs2_filecheck_sysfs_free(struct ocfs2_
{
struct ocfs2_filecheck_entry *p;

- if (!atomic_dec_and_test(&entry->fs_count))
- wait_on_atomic_t(&entry->fs_count, atomic_t_wait,
- TASK_UNINTERRUPTIBLE);
+ if (!atomic_dec_and_test(&entry->fs_count)) {
+ wait_var_event(&entry->fs_count,
+ !atomic_read(&entry->fs_count));
+ }

spin_lock(&entry->fs_fcheck->fc_lock);
while (!list_empty(&entry->fs_fcheck->fc_head)) {
@@ -183,7 +184,7 @@ static void
ocfs2_filecheck_sysfs_put(struct ocfs2_filecheck_sysfs_entry *entry)
{
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 *

\
 
 \ /
  Last update: 2018-03-15 13:38    [W:0.091 / U:0.692 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site