]> git.karo-electronics.de Git - karo-tx-linux.git/commit
llist: llist_add() can use llist_add_batch()
authorOleg Nesterov <oleg@redhat.com>
Wed, 19 Jun 2013 00:05:45 +0000 (10:05 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 19 Jun 2013 07:12:52 +0000 (17:12 +1000)
commit9c97a21ef287e2c409096d7a39bbe8b731d7be33
treedd63bb3563bb3845c105ac2aa2866eabeb35ec05
parent622f52ca784f3e00435f6c7de155e60b331e2e0f
llist: llist_add() can use llist_add_batch()

llist_add(new, head) can simply use llist_add_batch(new, new, head),
no need to duplicate the code.

This obviously uninlines llist_add() and to me this is a win. But we
can make llist_add_batch() inline if this is desirable, in this case
gcc can notice that new_first == new_last if the caller is llist_add().

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Andrey Vagin <avagin@openvz.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Huang Ying <ying.huang@intel.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/llist.h