start_renaming_two_dentries(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 start_renaming_two_dentries(9) β€” the Kernel API Manual page you didn't know you needed πŸ’…

okay so bestie, welcome to the start_renaming_two_dentries(9) page of the Kernel API Manual ✨ this is the lil' before step of a rename party β€” pull up a chair, we're locking dentries πŸ”’


πŸŽ€ NAME

start_renaming_two_dentries β€” grab the locks on two dentries in their given parents so a rename can actually happen πŸ’«


πŸ¦‹ SYNOPSIS

int start_renaming_two_dentries (struct renamedata *rd , struct dentry *old_dentry , struct dentry *new_dentry );

🌸 ARGUMENTS

  • rd β€” the rename data, and yes it's carrying the parent around with it πŸ‘œ
  • old_dentry β€” the dentry whose name is getting moved πŸƒβ€β™€οΈ
  • new_dentry β€” the dentry it's moving to 🎯

✨ DESCRIPTION

this is the vibe check before the rename 😀 it makes sure the locks are actually in place for the rename, and double-checks that the parentage is still correct. no cap, that's the whole job.

on success, the two dentries get stored in rd.old_dentry and rd.new_dentry, and rd.old_parent and rd.new_parent are confirmed to be the parents of those dentries 🫢 (yes, confirmed β€” we're not out here guessing).

references and the lock can be dropped with end_renaming, so don't ghost it πŸƒβ€β™€οΈπŸ’¨

πŸ’€ RETURN

zero or an error. that's it, that's the whole mood πŸ™ˆ


πŸ‘‘ SEE ALSO

the entire ./fs/namei.c cinematic universe, kernel file ./fs/namei.c β€” literally all of these, we're listing every single one because we don't gatekeep here πŸ’œ


okay that's the page, you ate it up bestie πŸ“ this one's from source ./fs, dated October 2026 β€” signed, sealed, and slayed πŸ’…πŸŽ€

πŸ“¦ where this page comes from