diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2010-03-22 17:45:14 -0500 |
---|---|---|
committer | Mike Christie <michaelc@cs.wisc.edu> | 2010-03-22 17:45:14 -0500 |
commit | 7f6a05718a11a4bf0a241aa657b638bfb370b819 (patch) | |
tree | ed387ef085d6f181fe4017e850e22be4437128f8 /include | |
parent | c94bb3206d8816f9d13c8d971513202d94cbb9ea (diff) | |
download | open-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.h | 12 |
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 |