aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-07-14 14:42:26 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-14 14:42:26 -0400
commit41d9884c44237cd66e2bdbc412028b29196b344c (patch)
tree7a386f6de2f07c01f87f3a16965c9bb8b40f63c1 /lib
parent63345b4794aef4ebe16502cfe35b02bc9822d763 (diff)
parentdae3794fd603b92dcbac2859fe0bc7fe129a5188 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull more vfs stuff from Al Viro: "O_TMPFILE ABI changes, Oleg's fput() series, misc cleanups, including making simple_lookup() usable for filesystems with non-NULL s_d_op, which allows us to get rid of quite a bit of ugliness" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: sunrpc: now we can just set ->s_d_op cgroup: we can use simple_lookup() now efivarfs: we can use simple_lookup() now make simple_lookup() usable for filesystems that set ->s_d_op configfs: don't open-code d_alloc_name() __rpc_lookup_create_exclusive: pass string instead of qstr rpc_create_*_dir: don't bother with qstr llist: llist_add() can use llist_add_batch() llist: fix/simplify llist_add() and llist_add_batch() fput: turn "list_head delayed_fput_list" into llist_head fs/file_table.c:fput(): add comment Safer ABI for O_TMPFILE
Diffstat (limited to 'lib')
-rw-r--r--lib/llist.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/lib/llist.c b/lib/llist.c
index 4a15115e90f8..4a70d120138c 100644
--- a/lib/llist.c
+++ b/lib/llist.c
@@ -39,18 +39,13 @@
39bool llist_add_batch(struct llist_node *new_first, struct llist_node *new_last, 39bool llist_add_batch(struct llist_node *new_first, struct llist_node *new_last,
40 struct llist_head *head) 40 struct llist_head *head)
41{ 41{
42 struct llist_node *entry, *old_entry; 42 struct llist_node *first;
43 43
44 entry = head->first; 44 do {
45 for (;;) { 45 new_last->next = first = ACCESS_ONCE(head->first);
46 old_entry = entry; 46 } while (cmpxchg(&head->first, first, new_first) != first);
47 new_last->next = entry;
48 entry = cmpxchg(&head->first, old_entry, new_first);
49 if (entry == old_entry)
50 break;
51 }
52 47
53 return old_entry == NULL; 48 return !first;
54} 49}
55EXPORT_SYMBOL_GPL(llist_add_batch); 50EXPORT_SYMBOL_GPL(llist_add_batch);
56 51