HomeFreeBSD

Fix zstream_t incorrect type

Description

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 <behlendorf1@llnl.gov>
Closes #1946

Details

Provenance
Shen Yan <shenyanxxxy@qq.com>Authored on Dec 10 2013, 6:58 AM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Dec 10 2013, 6:09 PM
Parents
rGbe5db977eaff: Remove MAX when initializing arc_c_max
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG5cb65efe2c3d: Fix zstream_t incorrect type (authored by Shen Yan <shenyanxxxy@qq.com>).Dec 10 2013, 6:09 PM