summaryrefslogtreecommitdiffstats
path: root/include/sys
diff options
context:
space:
mode:
authorShen Yan <[email protected]>2013-12-10 14:58:53 +0800
committerBrian Behlendorf <[email protected]>2013-12-10 10:09:27 -0800
commit5cb65efe2c3d4aaa77a5881be364c443c859bbc8 (patch)
tree42d79b4469c49a360c831360a18f8b16e76a38b6 /include/sys
parentbe5db977eaffd11ae52ddcbb0b64b53ec000082a (diff)
Fix zstream_t incorrect type
The DMU zfetch code organizes streams with lists not avl trees. A avl_node_t was mistakenly used for a list_node_t in the zstream_t type. This is incorrect (but harmless) and when unnoticed because: 1) The list functions explicitly cast the value preventing a warning, 2) sizeof(avl_node_t) >= sizeof(list_node_t) so no overrun occurs, and 3) The calculated offset is the same regardless of the type. Signed-off-by: Brian Behlendorf <[email protected]> Closes #1946
Diffstat (limited to 'include/sys')
-rw-r--r--include/sys/dmu_zfetch.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sys/dmu_zfetch.h b/include/sys/dmu_zfetch.h
index 442ab1599..38ed1d872 100644
--- a/include/sys/dmu_zfetch.h
+++ b/include/sys/dmu_zfetch.h
@@ -50,7 +50,7 @@ typedef struct zstream {
uint64_t zst_cap; /* prefetch limit (cap), in blocks */
kmutex_t zst_lock; /* protects stream */
clock_t zst_last; /* lbolt of last prefetch */
- avl_node_t zst_node; /* embed avl node here */
+ list_node_t zst_node; /* next zstream here */
} zstream_t;
typedef struct zfetch {