kernfs_create_empty_dir(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… kernfs_create_empty_dir(9) πŸ’…

okay so bestie, welcome to the Kernel API Manual β€” today’s main character is kernfs_create_empty_dir(9), and we’re gonna get you comfy with it. no cap. πŸ’–


🌸 NAME 🌸

kernfs_create_empty_dir β€” create an always empty directory. literally that’s the vibe: it makes a directory that is always empty, periodt. ✨


✨ SYNOPSIS ✨

here’s the exact signature, no edits, no β€œfixing” it:

struct kernfs_node * kernfs_create_empty_dir (struct kernfs_node *parent
       , const char *name );

πŸŽ€ ARGUMENTS πŸŽ€

two lil inputs, both iconic:

  • parent β€” the parent in which to create a new directory 🫢
  • name β€” the name of the new directory 🏷️

πŸ”₯ RETURN πŸ”₯

on success you get the created node, and on failure you get an ERR_PTR value. that’s the whole vibe check, fr fr. πŸ’€


πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./fs/kernfs/dir.c is the spot, and here’s the whole reference squad β€” every single one, no skips:


mwah πŸ’‹ this page is from ./fs/kernfs, dated October 2026, and it’s all about kernfs_create_empty_dir(9). bye bestie 🫢

πŸ“¦ where this page comes from