Fix -Wuse-after-free warning in dbuf_issue_final_prefetch_done()
commit9619bcdefb0dff38e36f8c89d9e2980112105cbb
authorBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 20 Jun 2022 21:32:03 +0000 (20 21:32 +0000)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 27 Jun 2022 21:19:19 +0000 (27 14:19 -0700)
tree72b0b7bd1098958aa25129294a71dc0d5435f7b3
parentff7e405f83fbfcd763c4b7ed8b68258227765731
Fix -Wuse-after-free warning in dbuf_issue_final_prefetch_done()

Move the use of the private pointer after it is freed.  It's only
used as a tag so a dereference would never occur, but there's no
harm in inverting the order to resolve the warning.

    module/zfs/dbuf.c: In function 'dbuf_issue_final_prefetch_done':
    module/zfs/dbuf.c:3204:17: error:
    pointer 'private' may be used after 'free' [-Werror=use-after-free]

Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #13528
Closes #13575
module/zfs/dbuf.c