HomeFreeBSD

fusefs: fix two bugs regarding VOP_RECLAIM of the root inode

Description

fusefs: fix two bugs regarding VOP_RECLAIM of the root inode

  • We never send FUSE_LOOKUP for the root inode, since its inode number is hard-coded to 1. Therefore, we should not send FUSE_FORGET for it, lest the server see its lookup count fall below 0.
  • During VOP_RECLAIM, if we are reclaiming the root inode, we must clear the file system's vroot pointer. Otherwise it will be left pointing at a reclaimed vnode, which will cause future VOP_LOOKUP operations to fail. Previously we only cleared that pointer during VFS_UMOUNT. I don't know of any real-world way to trigger this bug.

Reviewed by: pfg
Differential Revision: https://reviews.freebsd.org/D34753

(cherry picked from commit 32273253667b941c376cf08383006b3a0cbc5ca2)

Details

Provenance
asomersAuthored on Apr 2 2022, 7:31 PM
Reviewer
pfg
Differential Revision
D34753: fusefs: fix two bugs regarding VOP_RECLAIM of the root inode
Parents
rG7eb963109563: amd64, i386: remove profile directive from NOTES
Branches
Unknown
Tags
Unknown