[PATCH 1/8] io-wq: code clean for io_wq_add_work_after()

Hao Xu
2021-09-27T06:17:31Z

Remove a local variable.

Signed-off-by: Hao Xu <haoxu@linux.alibaba.com>
---
fs/io-wq.h | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/fs/io-wq.h b/fs/io-wq.h
index bf5c4c533760..8369a51b65c0 100644
--- a/fs/io-wq.h
+++ b/fs/io-wq.h
@@ -33,11 +33,9 @@ static inline void wq_list_add_after(struct io_wq_work_node *node,
struct io_wq_work_node *pos,
struct io_wq_work_list *list)
{
- struct io_wq_work_node *next = pos->next;
-
+ node->next = pos->next;
pos->next = node;
- node->next = next;
- if (!next)
+ if (!node->next)
list->last = node;
}

--
2.24.4