提交 240c5185 编写于 作者: C Christophe JAILLET 提交者: Dave Kleikamp

jfs: Simplify code

Calling 'list_splice' followed by 'INIT_LIST_HEAD' is equivalent to
'list_splice_init'.

This has been spotted with the following coccinelle script:
/////
@@
expression y,z;
@@

-   list_splice(y,z);
-   INIT_LIST_HEAD(y);
+   list_splice_init(y,z);
Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: NDave Kleikamp <dave.kleikamp@oracle.com>
上级 7cfcd8b7
...@@ -2893,8 +2893,7 @@ void txQuiesce(struct super_block *sb) ...@@ -2893,8 +2893,7 @@ void txQuiesce(struct super_block *sb)
* on anon_list2. Let's check. * on anon_list2. Let's check.
*/ */
if (!list_empty(&TxAnchor.anon_list2)) { if (!list_empty(&TxAnchor.anon_list2)) {
list_splice(&TxAnchor.anon_list2, &TxAnchor.anon_list); list_splice_init(&TxAnchor.anon_list2, &TxAnchor.anon_list);
INIT_LIST_HEAD(&TxAnchor.anon_list2);
goto restart; goto restart;
} }
TXN_UNLOCK(); TXN_UNLOCK();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册