file_update_time(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

file_update_time(9) 🌸

okay so this little icon is straight outta the Kernel API Manual, and it's lowkey doing a very specific timestamp glow-up. no cap, it's giving "tiny function, very particular job" energy. πŸ’…

✨ NAME ✨

file_update_time β€” update mtime and ctime time. periodt. πŸŽ€

🌈 SYNOPSIS 🌈

int file_update_time (struct file *file );

πŸŽ€ ARGUMENTS πŸŽ€

  • file β€” file accessed. that's the one in question, bestie. 🫢

πŸ’– DESCRIPTION πŸ’–

okay so file_update_time updates the mtime and ctime members of an inode and marks the inode for writeback. literally the timestamp update + writeback flag combo. ✨

bestie, read this part twice: this function is meant exclusively for usage in the file write path of filesystems, and filesystems may choose to explicitly ignore updates via this function with the _NOCMTIME inode flag, e.g. for network filesystem where these imestamps are handled by the server. 🫢

also highkey important: this can return an error for file systems who need to allocate space in order to update an inode. so yeah, it's not always a free little timestamp slay. 😭

⭐ RETURN ⭐

  • 0 on success. slay. πŸ’–
  • negative errno on failure. not slay, but factual. πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

the Kernel file ./fs/inode.c is the main character source here, and the whole linked crew is:


and that's the whole vibe check, bestie β€” signed, sealed, timestamped from ./fs, October 2026 πŸ’Œβœ¨

πŸ“¦ where this page comes from