HomeFreeBSD

Fix zio leak in dbuf_read()

Description

Fix zio leak in dbuf_read()

Currently, dbuf_read() may decide to create a zio_root which is
used as a parent for any child zios created in dbuf_read_impl().
However, if there is an error in dbuf_read_impl(), this zio is
never executed and ends up leaked. This patch simply ensures
that we always execute the root zio, even i it has no real work
to do.

Reviewed-by: Matt Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #8267

Details

Provenance
Tom Caputi <tcaputi@datto.com>Authored on Jan 15 2019, 8:23 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Jan 15 2019, 8:23 PM
Parents
rG7b02fae7a667: Verify .gitignore entries
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG5e7f3ace5807: Fix zio leak in dbuf_read() (authored by Tom Caputi <tcaputi@datto.com>).Jan 15 2019, 8:23 PM