server: Make sure we don't get into an infinite loop freeing inodes.
This commit is contained in:
parent
4241adbfcf
commit
309a9bf36f
|
@ -492,10 +492,10 @@ static void free_inode( struct inode *inode )
|
||||||
|
|
||||||
if (!subtree && !inode->parent)
|
if (!subtree && !inode->parent)
|
||||||
{
|
{
|
||||||
struct list *head;
|
struct inode *tmp, *next;
|
||||||
while ( (head = list_head(&inode->children)) )
|
LIST_FOR_EACH_ENTRY_SAFE( tmp, next, &inode->children,
|
||||||
|
struct inode, ch_entry )
|
||||||
{
|
{
|
||||||
struct inode *tmp = LIST_ENTRY( head, struct inode, ch_entry );
|
|
||||||
assert( tmp != inode );
|
assert( tmp != inode );
|
||||||
assert( tmp->parent == inode );
|
assert( tmp->parent == inode );
|
||||||
free_inode( tmp );
|
free_inode( tmp );
|
||||||
|
|
Loading…
Reference in New Issue