finish_no_open(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 an ERR_PTR(-E...), or a NULL β€” 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 β€” unlike finish_open, this function does consume the dentry reference, so the caller does not need to dput it. 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 🧚

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