nfs_fattr_ma...d_free_names(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… nfs_fattr_map_and_free_names(9) β€” from the Kernel API Manual, bestie

okay so picture this: you're deep in the kernel, you've got NFSv4 owner/group strings just sitting there in your nfs_fattr, and you need them as real live numbers. that's the whole gig. this is the helper that does the glow-up and then cleans up after itself. iconic behavior honestly 🧚


✨ NAME ✨

nfs_fattr_map_and_free_names β€” maps the owner/group strings into uid/gid and then frees them. like, does the conversion AND takes out the trash. main character energy fr fr πŸ’…


🌸 SYNOPSIS 🌸

void nfs_fattr_map_and_free_names (struct nfs_server *server , struct nfs_fattr *fattr );

πŸŽ€ ARGUMENTS πŸŽ€

  • server β€” pointer to the filesystem nfs_server structure. yes bestie, the actual server struct, the whole vibe check of which filesystem we're on πŸ¦‹
  • fattr β€” a fully initialised nfs_fattr structure. like, fully. don't come at it half-set-up, that's not the move πŸ™ˆ

πŸ”₯ DESCRIPTION πŸ”₯

so here's what this lil helper does, and honestly it's giving efficiency πŸ‘‘

it takes the cached NFSv4 owner/group strings hanging out in fattr, maps them into their numeric uid/gid equivalents, and then β€” the way that it just frees the cached strings afterwards β€” periodt. conversion done, memory released, no leftovers, no crumbs. we love a clean exit ✨

lowkey the order matters conceptually: map first, free second. it's mapping the cached strings, then freeing those strings. that's the whole sentence, don't overthink it 🫢

🌈 SEE ALSO 🌈

kernel file ./fs/nfs/nfs4idmap.c, plus these two besties who are definitely in the group chat:


and that's the page!! πŸ’– source/version: ./fs/nfs, dated October 2026 β€” go forth, map those names, free those strings, slay πŸ’…πŸŽ€β­

πŸ“¦ where this page comes from