[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230508075812.76077-4-eiichi.tsukata@nutanix.com>
Date: Mon, 8 May 2023 07:58:11 +0000
From: Eiichi Tsukata <eiichi.tsukata@...anix.com>
To: paul@...l-moore.com, eparis@...hat.com,
linux-kernel@...r.kernel.org, audit@...r.kernel.org
Cc: Eiichi Tsukata <eiichi.tsukata@...anix.com>
Subject: [PATCH 3/4] audit: convert DECLARE_WAITQUEUE to DEFINE_WAIT
As there is no need to use DECLARE_WAITQUEUE, use simpler DEFINE_WAIT.
Signed-off-by: Eiichi Tsukata <eiichi.tsukata@...anix.com>
---
kernel/audit.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/kernel/audit.c b/kernel/audit.c
index 89e119ccda76..bcbb0ba33c84 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -640,13 +640,13 @@ static void kauditd_retry_skb(struct sk_buff *skb, __always_unused int error)
static long wait_for_kauditd(long stime)
{
long rtime;
- DECLARE_WAITQUEUE(wait, current);
+ DEFINE_WAIT(wait);
- add_wait_queue_exclusive(&audit_backlog_wait, &wait);
- set_current_state(TASK_UNINTERRUPTIBLE);
+ prepare_to_wait_exclusive(&audit_backlog_wait, &wait,
+ TASK_UNINTERRUPTIBLE);
rtime = schedule_timeout(stime);
atomic_add(stime - rtime, &audit_backlog_wait_time_actual);
- remove_wait_queue(&audit_backlog_wait, &wait);
+ finish_wait(&audit_backlog_wait, &wait);
return rtime;
}
--
2.40.0
Powered by blists - more mailing lists