+ add-list_merge-to-listh.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     block: add list_merge to list.h

has been added to the -mm tree.  Its filename is

     add-list_merge-to-listh.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: block: add list_merge to list.h
From: "Nate Diller" <nate.diller@xxxxxxxxx>

list_merge behaves like list_splice, except it can be used with headless
lists.  that is, the resulting list will have @head immediately preceeding
@list.

This is used by the contig list feature in the Elevator I/O scheduler

Signed-off-by: Nate Diller <nate.diller@xxxxxxxxx>
Cc: Jens Axboe <axboe@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 include/linux/list.h |   21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff -puN include/linux/list.h~add-list_merge-to-listh include/linux/list.h
--- a/include/linux/list.h~add-list_merge-to-listh
+++ a/include/linux/list.h
@@ -345,6 +345,27 @@ static inline void list_splice_init(stru
 }
 
 /**
+ * list_merge - merge two headless lists
+ * @list: the new list to merge.
+ * @head: the place to add it in the first list.
+ *
+ * This is similar to list_splice(), except it merges every item onto @list,
+ * not excluding @head itself.  It is a noop if @head already immediately
+ * preceeds @list.
+ */
+static inline void list_merge(struct list_head *list, struct list_head *head)
+{
+	struct list_head *last = list->prev;
+	struct list_head *at = head->next;
+
+	list->prev = head;
+	head->next = list;
+
+	last->next = at;
+	at->prev = last;
+}
+
+/**
  * list_entry - get the struct for this entry
  * @ptr:	the &struct list_head pointer.
  * @type:	the type of the struct this is embedded in.
_

Patches currently in -mm which might be from nate.diller@xxxxxxxxx are

add-elv_extended_request-call-to-iosched-api.patch
add-list_merge-to-listh.patch
add-the-elevator-i-o-scheduler.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

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux