HomeFreeBSD

vfs: Fix "emptydir" mount option

Description

vfs: Fix "emptydir" mount option

Fix vfs_emptydir(). It would consider directories containing directories
with name of the form 'X.' (X being any authorized byte) as empty. Also,
it would cause VOP_READDIR() to return an error on directories
containing enough whiteouts. While here, use a more decently sized
buffer as done elsewhere.

Remove ad-hoc iteration on the directory's content and instead use the
newly exported vn_dir_next_dirent() function (this is what fixes the
second problem mentioned above).

PR: 270988
Reviewed by: kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D39775

Details

Provenance
olceAuthored on Apr 22 2023, 4:07 PM
kibCommitted on Apr 28 2023, 1:27 AM
Reviewer
kib
Differential Revision
D39775: vfs: Fix "emptydir" mount option
Parents
rG3d8450db4c60: vfs: vn_dir_next_dirent(): Simplify interface and harden
Branches
Unknown
Tags
Unknown