]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
tmpfs_destroy_vobject(): clear v_object under the object lock
authorKonstantin Belousov <kib@FreeBSD.org>
Sun, 12 May 2024 01:26:32 +0000 (04:26 +0300)
committerKonstantin Belousov <kib@FreeBSD.org>
Mon, 13 May 2024 18:33:59 +0000 (21:33 +0300)
commit46811949797b7e44521cd56cfa61b6c8378c4600
tree6c33258bb42f1535b9ae01535006e0db7afe585e
parent6ada4e8a0ae901f0012015c8d277d80aad7d8f37
tmpfs_destroy_vobject(): clear v_object under the object lock

Which allows tmpfs_pager_writecount_recalc() to reliably detect
reclaimed vnode and make its accesses to object->un_pager.swp.private
(== vp) safe against reclaim.  Note that vnode instantiation already
assigns v_object under the object lock.

Reviewed by: markj
Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D45119
sys/fs/tmpfs/tmpfs_subr.c