summaryrefslogtreecommitdiffstats
path: root/module/zfs/vdev.c
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2010-08-26 10:26:44 -0700
committerBrian Behlendorf <[email protected]>2010-08-31 08:38:45 -0700
commit98f72a539c8ca2ba1ca7fc8cac44018ade96065c (patch)
tree466e468d0e1b4abbad0e42cf7bbba222371a9962 /module/zfs/vdev.c
parent59e6e7ca85e984433fc9c929dd0d474579bb88a5 (diff)
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 <[email protected]>
Diffstat (limited to 'module/zfs/vdev.c')
-rw-r--r--module/zfs/vdev.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/module/zfs/vdev.c b/module/zfs/vdev.c
index 7a16a9865..17b45b0e8 100644
--- a/module/zfs/vdev.c
+++ b/module/zfs/vdev.c
@@ -317,6 +317,8 @@ vdev_alloc_common(spa_t *spa, uint_t id, uint64_t guid, vdev_ops_t *ops)
vd->vdev_state = VDEV_STATE_CLOSED;
vd->vdev_ishole = (ops == &vdev_hole_ops);
+ list_link_init(&vd->vdev_config_dirty_node);
+ list_link_init(&vd->vdev_state_dirty_node);
mutex_init(&vd->vdev_dtl_lock, NULL, MUTEX_DEFAULT, NULL);
mutex_init(&vd->vdev_stat_lock, NULL, MUTEX_DEFAULT, NULL);
mutex_init(&vd->vdev_probe_lock, NULL, MUTEX_DEFAULT, NULL);