The branch stable/13 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=de1b69aec28617ffa6b0c3554ec78e7a87eb27a5
commit de1b69aec28617ffa6b0c3554ec78e7a87eb27a5 Author: Mateusz Guzik <[email protected]> AuthorDate: 2021-05-14 15:41:39 +0000 Commit: Mateusz Guzik <[email protected]> CommitDate: 2021-05-22 18:22:16 +0000 vfs: add missing atomic conversion to writecount adjustment Fixes: ("vfs: lockless writecount adjustment in set/unset text") (cherry picked from commit 852088f6af6c5cd44542dde72aa5c3f4c4f9353c) --- sys/kern/vfs_default.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c index eb584feb6c41..5a233603631e 100644 --- a/sys/kern/vfs_default.c +++ b/sys/kern/vfs_default.c @@ -1210,7 +1210,7 @@ vop_stdset_text(struct vop_set_text_args *ap) vrefl(vp); } - vp->v_writecount--; + atomic_subtract_int(&vp->v_writecount, 1); error = 0; } VI_UNLOCK(vp); @@ -1247,7 +1247,7 @@ vop_stdunset_text(struct vop_unset_text_args *ap) last = true; vp->v_iflag &= ~VI_TEXT_REF; } - vp->v_writecount++; + atomic_add_int(&vp->v_writecount, 1); error = 0; } else { error = EINVAL; _______________________________________________ [email protected] mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all To unsubscribe, send any mail to "[email protected]"
