[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <216356b1-38c1-8477-c4e8-03f497dd6ac8@huawei.com>
Date: Wed, 25 Sep 2019 20:52:26 +0800
From: Yunfeng Ye <yeyunfeng@...wei.com>
To: "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
<bvanassche@....org>, <bhelgaas@...gle.com>, <dsterba@...e.com>,
"tglx@...utronix.de" <tglx@...utronix.de>,
<alexander.h.duyck@...ux.intel.com>, <sakari.ailus@...ux.intel.com>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: [PATCH] async: Let kfree() out of the critical area of the lock
It's not necessary to put kfree() in the critical area of the lock, so
let it out.
Signed-off-by: Yunfeng Ye <yeyunfeng@...wei.com>
---
kernel/async.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/async.c b/kernel/async.c
index 4f9c1d6..1de270d 100644
--- a/kernel/async.c
+++ b/kernel/async.c
@@ -135,12 +135,12 @@ static void async_run_entry_fn(struct work_struct *work)
list_del_init(&entry->domain_list);
list_del_init(&entry->global_list);
- /* 3) free the entry */
- kfree(entry);
atomic_dec(&entry_count);
-
spin_unlock_irqrestore(&async_lock, flags);
+ /* 3) free the entry */
+ kfree(entry);
+
/* 4) wake up any waiters */
wake_up(&async_done);
}
--
2.7.4
Powered by blists - more mailing lists