summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2010-03-22 17:45:14 -0500
committerMike Christie <michaelc@cs.wisc.edu>2010-03-22 17:45:14 -0500
commit7f6a05718a11a4bf0a241aa657b638bfb370b819 (patch)
treeed387ef085d6f181fe4017e850e22be4437128f8 /include
parentc94bb3206d8816f9d13c8d971513202d94cbb9ea (diff)
downloadopen-iscsi-7f6a05718a11a4bf0a241aa657b638bfb370b819.tar.gz
iscsid: support discovery daemon auto logout
With this patch, if the sendtargets or isns daemon detects that a target is no longer sent it will logout the session.
Diffstat (limited to 'include')
-rw-r--r--include/list.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/list.h b/include/list.h
index a59ca00..cccc3c3 100644
--- a/include/list.h
+++ b/include/list.h
@@ -90,4 +90,16 @@ static inline void list_del_init(struct list_head *entry)
INIT_LIST_HEAD(entry);
}
+/**
+ * list_move_tail - delete from one list and add as another's tail
+ * @list: the entry to move
+ * @head: the head that will follow our entry
+ */
+static inline void list_move_tail(struct list_head *list,
+ struct list_head *head)
+{
+ __list_del(list->prev, list->next);
+ list_add_tail(list, head);
+}
+
#endif