infra: fix list initialization

This commit is contained in:
Thomas Schoebel-Theuer 2014-04-07 14:56:03 +02:00
parent 9d39da8096
commit ce7dbc07f1
2 changed files with 4 additions and 1 deletions

View File

@ -707,6 +707,7 @@ int mars_filler(void *__buf, const char *name, int namlen, loff_t offset,
newpath = NULL;
INIT_LIST_HEAD(&dent->dent_link);
INIT_LIST_HEAD(&dent->brick_list);
list_add(&dent->dent_link, start);

View File

@ -77,13 +77,15 @@ int mars_recv_dent_list(struct mars_socket *sock, struct list_head *anchor)
//MARS_IO("\n");
INIT_LIST_HEAD(&dent->dent_link);
INIT_LIST_HEAD(&dent->brick_list);
status = mars_recv_struct(sock, dent, mars_dent_meta);
if (status <= 0) {
mars_free_dent(dent);
goto done;
}
list_add_tail(&dent->dent_link, anchor);
INIT_LIST_HEAD(&dent->brick_list);
}
done:
return status;