inode_update_time(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… inode_update_time β€” like, the actual inode_update_time(9) page, bestie

okay so welcome to inode_update_time(9) from the Kernel API Manual ✨ this one's short and sweet and honestly kind of a vibe. it's the little helper that handles timestamp + version bumping on an inode, and it's trusting you to do the dirty-work part. no cap.


🌸 SYNOPSIS

int inode_update_time (struct inode *inode , enum fs_update_time type ,
                       unsigned int flags );

πŸŽ€ ARGUMENTS

  • inode β€” the inode getting updated. the main character of this whole operation 🫢
  • type β€” which timestamp we're updating. pick your fighter.
  • flags β€” flags for the update. the little extra seasoning ✨

πŸ’– DESCRIPTION

okay so here's the tea β˜• β€” this function updates either the atime or the c/mtime, plus the version, on an inode, if needed for a file access or modification. conditional queen behavior, honestly.

the important part, and i need you to hear me on this: it is up to the caller to mark the inode dirty appropriately. like, that's your job bestie, not the function's. it does the timestamp math and hands you back the vibes, but the dirty-marking is on you 🫡

the return value is literally giving three different moods:

  • a positive I_DIRTY_* flag for __mark_inode_dirty β€” returned when the inode actually needs to be marked dirty πŸ”₯
  • 0 β€” when it did not need it. nothing to do, we rest 😌
  • a negative errno β€” when an error happened 😭 that's the "it's not giving" outcome
so like, don't just ignore the return value, mmkay? it's literally telling you what to do next πŸ’€

πŸ¦‹ SEE ALSO

the whole fam, no gatekeeping πŸ’… β€” from the Kernel file ./fs/inode.c: inode_init_always_gfp(9), alloc_inode(9), drop_nlink(9), clear_nlink(9), set_nlink(9), inc_nlink(9), inode_sb_list_add(9), __insert_inode_hash(9), __remove_inode_hash(9), evict_inodes(9), new_inode(9), unlock_new_inode(9), lock_two_nondirectories(9), unlock_two_nondirectories(9), inode_insert5(9), iget5_locked(9), iget5_locked_rcu(9), iget_locked(9), iunique(9), ihold(9), ilookup5_nowait(9), ilookup5(9), ilookup(9), find_inode_nowait(9), find_inode_rcu(9), find_inode_by_ino_rcu(9), iput(9), iput_not_last(9), bmap(9), generic_update_time(9), atime_needs_update(9), file_remove_privs(9), current_time(9), file_update_time(9), file_modified_flags(9), file_modified(9), kiocb_modified(9), inode_init_owner(9), inode_owner_or_capable(9), inode_dio_wait(9), timestamp_truncate(9), inode_set_ctime_current(9), inode_set_ctime_deleg(9), in_group_or_capable(9), mode_strip_sgid(9), dump_inode(9)

iykyk πŸ‘‘ if you're gonna touch timestamps you're gonna meet at least half of these. it's giving family reunion 🧚


and that's the page!! mwah πŸ’‹ this little love letter came out of the ./fs source/version, dated October 2026, and yes it ships under the manual name inode_update_time(9) β€” go forth and mark your inodes dirty (appropriately, bestie) πŸŒˆβ­πŸ“

πŸ“¦ where this page comes from