Page MenuHomeFreeBSD

getdirentries: return ENOENT for unlinked but still open directory.
ClosedPublic

Authored by dchagin on Mar 26 2022, 5:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jan 20, 3:30 PM
Unknown Object (File)
Sat, Jan 18, 12:34 AM
Unknown Object (File)
Tue, Jan 14, 2:21 PM
Unknown Object (File)
Mon, Jan 6, 8:05 PM
Unknown Object (File)
Dec 6 2024, 3:59 PM
Unknown Object (File)
Nov 21 2024, 6:46 AM
Unknown Object (File)
Nov 17 2024, 7:09 AM
Unknown Object (File)
Nov 11 2024, 2:04 PM

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 44899
Build 41787: arc lint + arc unit

Event Timeline

mjg added inline comments.
sys/kern/vfs_syscalls.c
3959

rmdir might have failed, but also this is not the place to do it. it should be in vop_rmdir_post

sys/kern/vfs_syscalls.c
3959

the flag itself is only used by gjournal, so a new one would have to be introduced for this purpose (VV_UNLINKED?)

Other than that, English LGTM. Can't vouch for content.

lib/libc/sys/getdirentries.2
197

I'd be more specific here, maybe by repeating "unlinked but still open directory".

Also, while touching this area, I'd mention that getdents() has the same errno values (if it does).

This revision now requires changes to proceed.Mar 26 2022, 11:03 PM
sys/kern/vfs_subr.c
5980

again you need to error check -- move it into the !rc case

sys/kern/vfs_syscalls.c
4197

i guess __predict_false on this would not hurt

ah, fixed, thank you, Mateusz

This revision is now accepted and ready to land.Mar 27 2022, 9:14 PM