HomeFreeBSD

tmpfs: resolve deadlock between rename and unmount.

Description

tmpfs: resolve deadlock between rename and unmount.

Top-level kern_renameat() increases the writecount on the mount point,
which, together with tmpfs unmount suspending the mount, already
ensures that unmount cannot proceed while rename unlocks and relocks
all operated vnodes.

Remove vfs_busy() call from tmpfs_rename() which was done while
holding a vnode lock, creating the deadlock. The only intent of the
busy operation seems to be the prevention of unmount, which is already
ensured.

Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

Details

Provenance
kibAuthored on
Parents
rS355060: amd64: assert that EARLY_COUNTER does not corrupt memory.
Branches
Unknown
Tags
Unknown