is_subdir(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ is_subdir(9) β€” Kernel API Manual, but make it cute πŸ¦‹

🌸 NAME 🌸

is_subdir β€” is new dentry a subdirectory of old_dentry? That's the whole question, bestie. πŸ•΅οΈβ€β™€οΈ


✨ SYNOPSIS ✨

bool is_subdir (struct dentry *new_dentry , struct dentry *old_dentry );

πŸŽ€ ARGUMENTS πŸŽ€

  • new_dentry β€” the new dentry, the fresh little entry we're checking. 🫢
  • old_dentry β€” the old dentry, the one it's being checked against. πŸ’…

πŸ’– DESCRIPTION πŸ’–

Okay so here's the tea: is_subdir returns true if new_dentry is a subdirectory of the parent (at any depth). It returns false otherwise. No cap. ✨

⚠️ caller responsibility, bestie: the caller must ensure that "new_dentry" is pinned before calling is_subdir. Like, do not skip this. πŸ’€

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./fs/dcache.c is the home base, and the whole friend group is:

okay bye bestie πŸ’… this page's source/version is ./fs, dated October 2026, and it's still is_subdir(9) β€” mwah! 🫢

πŸ“¦ where this page comes from