The patch titled list: introduce list_replace() helper has been added to the -mm tree. Its filename is list-introduce-list_replace-helper.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this From: Oleg Nesterov <oleg@xxxxxxxxxx> list_replace() is similar to list_replace_rcu(), but unlike list_replace_rcu() it could be used when list_empty(old) == 1 doesn't use barriers Signed-off-by: Oleg Nesterov <oleg@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- include/linux/list.h | 23 +++++++++++++++++++++++ 1 files changed, 23 insertions(+) diff -puN include/linux/list.h~list-introduce-list_replace-helper include/linux/list.h --- devel/include/linux/list.h~list-introduce-list_replace-helper 2006-05-18 01:25:32.000000000 -0700 +++ devel-akpm/include/linux/list.h 2006-05-18 01:25:32.000000000 -0700 @@ -190,12 +190,35 @@ static inline void list_del_rcu(struct l entry->prev = LIST_POISON2; } +/** + * list_replace - replace old entry by new one + * @old : the element to be replaced + * @new : the new element to insert + * Note: if 'old' was empty, it will be overwritten. + */ +static inline void list_replace(struct list_head *old, + struct list_head *new) +{ + new->next = old->next; + new->next->prev = new; + new->prev = old->prev; + new->prev->next = new; +} + +static inline void list_replace_init(struct list_head *old, + struct list_head *new) +{ + list_replace(old, new); + INIT_LIST_HEAD(old); +} + /* * list_replace_rcu - replace old entry by new one * @old : the element to be replaced * @new : the new element to insert * * The old entry will be replaced with the new entry atomically. + * Note: 'old' should not be empty. */ static inline void list_replace_rcu(struct list_head *old, struct list_head *new) _ Patches currently in -mm which might be from oleg@xxxxxxxxxx are avoid-tasklist_lock-at-getrusage-for-multithreaded-case-too.patch ptrace-document-the-locking-rules.patch when-config_base_samll=1-the-kernel-261611-cascade-in-kernel-timerc-may-enter-the-infinite-loop.patch list-introduce-list_replace-helper.patch proc-remove-tasklist_lock-from-proc_pid_readdir-simply-fix-first_tgid.patch proc-dont-lock-task_structs-indefinitely.patch proc-dont-lock-task_structs-indefinitely-task_mmu-small-fixes.patch simplify-fix-first_tid.patch cleanup-next_tid.patch de_thread-fix-lockless-do_each_thread.patch coredump-optimize-mm-users-traversal.patch coredump-speedup-sigkill-sending.patch coredump-kill-ptrace-related-stuff.patch coredump-kill-ptrace-related-stuff-fix.patch coredump-dont-take-tasklist_lock.patch coredump-some-code-relocations.patch coredump-shutdown-current-process-first.patch coredump-copy_process-dont-check-signal_group_exit.patch pidhash-temporary-debug-checks.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html