]> git.proxmox.com Git - mirror_zfs.git/commit
Fix a logic bug in the FreeBSD getpages VOP
authorMark Johnston <markjdb@gmail.com>
Tue, 22 Sep 2020 23:05:52 +0000 (19:05 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 1 Oct 2020 19:16:33 +0000 (12:16 -0700)
commite651a5b2336c44b0ca52d119b0ebccc2737a05a6
treee74873e2027ee760797b50cb3467789252064799
parent723726ae7de44829d1515e757db7527737702e9a
Fix a logic bug in the FreeBSD getpages VOP

In commit cd32b4f5b79c ("Fix a deadlock in the FreeBSD getpages VOP") I
introduced a bug while porting the patch originally committed to
FreeBSD: the rangelock pointer may be NULL if the try operation failed,
so we must avoid calling zfs_rangelock_unlock() in that case.

Reviewed-by: Allan Jude <allan@klarasystems.com>
Reviewed-by: Ryan Moeller <ryan@ixsystems.com>
Reviewed-by: Matt Macy <mmacy@FreeBSD.org>
Reported-by: Steve Wills <swills@FreeBSD.org>
Signed-off-by: Mark Johnston <markj@FreeBSD.org>
Closes #10519
Closes #10960
module/os/freebsd/zfs/zfs_vnops.c