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.

MFC after: 2 weeks
Reviewed by: pfg
Differential Revision: https://reviews.freebsd.org/D34753

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
rG4710aa248bcd: Avoid dereferencing a possibly null pointer.
Branches
Unknown
Tags
Unknown