ubifs_jnl_delete_inode(9)
π ubifs_jnl_delete_inode β a Kernel API Manual moment (section 9, bestie)
okay so this is ubifs_jnl_delete_inode(9), straight out of the Kernel API Manual, and yes it's exactly what it sounds like: it deletes an inode. icon behavior. let's get into it π«Ά
β¨ NAME β¨
ubifs_jnl_delete_inode β delete an inode. that's it. that's the whole vibe. π
πΈ SYNOPSIS πΈ
int ubifs_jnl_delete_inode (struct ubifs_info *c , const struct inode
*inode );
π¦ ARGUMENTS π¦
cβ the UBIFS file-system description object. your whole filesystem's little passport, basically πinodeβ the inode to delete. bye bestie π
π DESCRIPTION π
so this function deletes the inode inode, and that includes:
- removing it from orphans,
- deleting it from TNC,
- and, in some cases, writing a deletion inode to the journal.
all in one go. main character energy, honestly β¨
When regular file inodes are unlinked, or a directory inode is removed, the direntry to the media, and adds the inode to orphans. After this, when the last reference to this inode has been dropped, this function is called. In general, it has to write one more deletion inode to the media, because if a commit happened between ubifs_jnl_update and anymore, and in fact it might not be on the flash anymore, because it might have been garbage-collected already.
And for optimization reasons UBIFS does not read the orphan area if it has been unmounted cleanly, so it would have no indication in the journal that there is a deleted inode which has to be removed from TNC.
ngl bestie, this manpage has some sentences that literally cut off mid-thought π i'm not gonna invent the missing words β no cap, that would be making stuff up β so you're getting the text exactly as it stands. the facts that are here are all here π«Ά
However, if there was no commit between ubifs_jnl_update and inode to the media for the second time. And this is quite a typical case. π«
This function returns zero in case of success and a negative error code in case of failure. periodt.
π SEE ALSO π
Kernel file ./fs/ubifs/journal.c and its whole friend group:
zero_ino_node_unused(9)zero_dent_node_unused(9)zero_trun_node_unused(9)reserve_space(9)write_head(9)__queue_and_wait(9)wait_for_reservation(9)wake_up_reservation(9)add_or_start_queue(9)make_reservation(9)release_head(9)finish_reservation(9)get_dent_type(9)pack_inode(9)mark_inode_clean(9)ubifs_jnl_update(9)ubifs_jnl_write_data(9)ubifs_jnl_write_inode(9)ubifs_jnl_xrename(9)ubifs_jnl_rename(9)truncate_data_node(9)ubifs_jnl_truncate(9)ubifs_jnl_delete_xattr(9)ubifs_jnl_change_xattr(9)
like, the entire journal.c friend group showed up to the party π§π
and that's the whole page! this one lives in ./fs/ubifs, dated October 2026 β so go forth, delete those inodes, and slay π
β
π¦ 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