finish_no_open(9)
π
finish_no_open β finishing ->atomic_open() without actually opening the file
okay so bestie, we're deep in the kernel API manual rn (section 9, the big-girl section, iykyk) and this is the page for finish_no_open. it's giving "wrapping things up but make it NOT open anything" and honestly? iconic. β¨
β¨ NAME β¨
finish_no_open β finish ->atomic_open() without opening the file π
π¦ SYNOPSIS π¦
int finish_no_open (struct file *file , struct dentry *dentry );
literally that's the whole signature, no cap. π
πΈ ARGUMENTS πΈ
fileβ the file pointer. that's it, that's the description, we love a low-maintenance king πdentryβ a dentry, or anERR_PTR(-E...), or aNULLβ whatever came back from->lookupπ«Ά
π₯ DESCRIPTION π₯
okay so here's the vibe: you can use this bad boy to set the result of a lookup inside ->atomic_open. that's its whole job and it does it slayfully. π
NB: and this is the important part, bestie β unlikefinish_open, this function does consume the dentry reference, so the caller does not need todputit. like. don't. don't do it. the reference is already eaten, don't double-free your way into a bad time ππ
it returns 0 or -E..., and whatever it returns must be the return value of ->atomic_open after you've called this function. fr fr, that's not a suggestion, that's the contract. β
π§ SEE ALSO π§
- the kernel file
./fs/open.cπ finish_open(9)vfs_open(9)kernel_file_open(9)file_open_name(9)filp_open(9)
go read those too, they're all gonna be in the group chat together π«Ά
and that's the page!! π this little cutie lives in ./fs, it's rocking the October 2026 version, and it was dated October 2026 too (yes bestie, same energy, no we will not be questioning the timeline πΈ). periodt. π
β¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms