diff options
author | Mateusz Guzik <mjg@FreeBSD.org> | 2020-01-03 22:12:25 +0000 |
---|---|---|
committer | Mateusz Guzik <mjg@FreeBSD.org> | 2020-01-03 22:12:25 +0000 |
commit | 4a20fe31c373d6a6c81bd6205d210bd893dc8068 (patch) | |
tree | 38a5faa11e42a85bafd2bcedfa8c8ef8ceaa76a2 /sys/fs/unionfs/union_subr.c | |
parent | 3d59b89c7a880c913c99df656246e1a9c82adf95 (diff) |
unionfs: fix up VOP_UNLOCK use after flags stopped being supported
For the most part the code was passing the LK_RELEASE flag.
The 2 cases which did not use the VOP_UNLOCK_FLAGS macro.
This fixes a panic when stacking unionfs on top of e.g., tmpfs when
debug is enabled.
Note there are latent bugs which prevent unionfs from working with debug
regardless of this change.
PR: 243064
Reported by: Mason Loring Bliss
Notes
Notes:
svn path=/head/; revision=356336
Diffstat (limited to 'sys/fs/unionfs/union_subr.c')
-rw-r--r-- | sys/fs/unionfs/union_subr.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/fs/unionfs/union_subr.c b/sys/fs/unionfs/union_subr.c index 85b8db5709ac..cc2d41768f73 100644 --- a/sys/fs/unionfs/union_subr.c +++ b/sys/fs/unionfs/union_subr.c @@ -361,9 +361,9 @@ unionfs_noderem(struct vnode *vp, struct thread *td) VI_UNLOCK(vp); if (lvp != NULLVP) - VOP_UNLOCK(lvp, LK_RELEASE); + VOP_UNLOCK(lvp, 0); if (uvp != NULLVP) - VOP_UNLOCK(uvp, LK_RELEASE); + VOP_UNLOCK(uvp, 0); if (dvp != NULLVP && unp->un_hash.le_prev != NULL) unionfs_rem_cached_vnode(unp, dvp); @@ -551,7 +551,7 @@ unionfs_relookup(struct vnode *dvp, struct vnode **vpp, cn->cn_flags |= NOCACHE; vref(dvp); - VOP_UNLOCK(dvp, LK_RELEASE); + VOP_UNLOCK(dvp, 0); if ((error = relookup(dvp, vpp, cn))) { uma_zfree(namei_zone, cn->cn_pnbuf); @@ -961,7 +961,7 @@ unionfs_vn_create_on_upper(struct vnode **vpp, struct vnode *udvp, } unionfs_vn_create_on_upper_free_out1: - VOP_UNLOCK(udvp, LK_RELEASE); + VOP_UNLOCK(udvp, 0); unionfs_vn_create_on_upper_free_out2: if (cn.cn_flags & HASBUF) { |