]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix zio leak in dbuf_read()
authorTom Caputi <tcaputi@datto.com>
Tue, 15 Jan 2019 20:23:40 +0000 (15:23 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 15 Jan 2019 20:23:40 +0000 (12:23 -0800)
commit5e7f3ace5807f950f3529361e03970101e61aa44
treeca4082ed13bc96da3b8bf1350dd1c0d74c05956d
parent7b02fae7a6670579437d1fb490362f70168b0666
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
module/zfs/dbuf.c