diff --git a/src/add-ons/kernel/file_systems/cdda/kernel_interface.cpp b/src/add-ons/kernel/file_systems/cdda/kernel_interface.cpp index 9d825b79d8..d31d9672f5 100644 --- a/src/add-ons/kernel/file_systems/cdda/kernel_interface.cpp +++ b/src/add-ons/kernel/file_systems/cdda/kernel_interface.cpp @@ -20,6 +20,7 @@ #include #include +#include #include #include "cdda.h" @@ -41,7 +42,7 @@ struct attr_cookie; struct dir_cookie; typedef DoublyLinkedList AttributeList; -typedef DoublyLinkedList AttrCookieList; +typedef SinglyLinkedList AttrCookieList; struct riff_header { uint32 magic; @@ -255,7 +256,7 @@ enum { ITERATION_STATE_BEGIN = ITERATION_STATE_DOT, }; -struct attr_cookie : DoublyLinkedListLinkImpl { +struct attr_cookie : SinglyLinkedListLinkImpl { Attribute* current; }; @@ -1372,7 +1373,8 @@ Inode::AddAttrCookie(attr_cookie* cookie) void Inode::RemoveAttrCookie(attr_cookie* cookie) { - fAttrCookies.Remove(cookie); + if (!fAttrCookies.Remove(cookie)) + panic("Tried to remove %p which is not in cookie list.", cookie); }