file_update_time(9)
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 β
0on success. slay. π- negative
errnoon 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:
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)inode_update_time(9)generic_update_time(9)atime_needs_update(9)file_remove_privs(9)current_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)
and that's the whole vibe check, bestie β signed, sealed, timestamped from ./fs, October 2026 πβ¨
π¦ 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