]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
tmpfs_reclaim: detach unlinked node on dereferencing.
authorKonstantin Belousov <kib@FreeBSD.org>
Tue, 12 Jan 2021 16:10:07 +0000 (18:10 +0200)
committerKonstantin Belousov <kib@FreeBSD.org>
Thu, 14 Jan 2021 12:51:37 +0000 (14:51 +0200)
commit2d1e4220ebd50b9220d3266754425f025c786108
tree39dee68a17c48751f84feb20ab9d2d85acc10618
parent685265ecfbd8e929d7c6988a99b708d3a3a5cbf4
tmpfs_reclaim: detach unlinked node on dereferencing.

Otherwise it is dereferenced one extra time at unmount, if it survives
long enough.  One way to hold the reference on such node is to keep it
open.

tmpfs_vptocnp() now needs to account for the possibility that unlocked
node was removed from the list.

Reported by: danfe
Tested by: danfe, pho
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
sys/fs/tmpfs/tmpfs_vnops.c