From 98f72a539c8ca2ba1ca7fc8cac44018ade96065c Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 26 Aug 2010 10:26:44 -0700 Subject: Fix list handling to only use the API Remove all instances of list handling where the API is not used and instead list data members are directly accessed. Doing this sort of thing is bad for portability. Additionally, ensure that list_link_init() is called on newly created list nodes. This ensures the node is properly initialized and does not rely on the assumption that zero'ing the list_node_t via kmem_zalloc() is the same as proper initialization. Signed-off-by: Brian Behlendorf --- module/zfs/dsl_dataset.c | 1 + 1 file changed, 1 insertion(+) (limited to 'module/zfs/dsl_dataset.c') diff --git a/module/zfs/dsl_dataset.c b/module/zfs/dsl_dataset.c index 226e98828..f6f198791 100644 --- a/module/zfs/dsl_dataset.c +++ b/module/zfs/dsl_dataset.c @@ -393,6 +393,7 @@ dsl_dataset_get_ref(dsl_pool_t *dp, uint64_t dsobj, void *tag, ds->ds_dbuf = dbuf; ds->ds_object = dsobj; ds->ds_phys = dbuf->db_data; + list_link_init(&ds->ds_synced_link); mutex_init(&ds->ds_lock, NULL, MUTEX_DEFAULT, NULL); mutex_init(&ds->ds_recvlock, NULL, MUTEX_DEFAULT, NULL); -- cgit v1.2.3