nfsd_user_namespace(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– nfsd_user_namespace(9) πŸ’–

okay bestie, welcome to the Kernel API Manual page for nfsd_user_namespace β€” yes that's the manpage-y title, we're keeping the whole name because that's literally her whole identity ✨


πŸ¦‹ NAME πŸ¦‹

nfsd_user_namespace β€” gets you the user_namespace that's actually in effect for an RPC request, no cap 🫢


🌸 SYNOPSIS 🌸

struct user_namespace * nfsd_user_namespace (const struct svc_rqst
*rqstp );

like, she takes one thing and hands you back a pointer, that's the whole vibe πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • rqstp β€” the RPC execution context. that's it, that's the whole argument, she's lowkey low-maintenance 🧚

✨ DESCRIPTION ✨

okay so here's the tea β˜• β€” xpt_cred is set once at transport creation and then never modified. like, ever. it's giving "set it and forget it" main character energy πŸ‘‘

and the transport itself is reference-counted during request processing, which means you do not need to take an explicit reference on the namespace. nope! not needed! the refcounting is already handling it for you, so don't be out here doing extra work for no reason 😭


🌈 RETURN 🌈

she returns the user_namespace from the transport credential πŸ’–

but β€” and this is the important part β€” if no credential was set, you get init_user_ns instead. so it's never just nothing, you always get something 🫢

also the returned namespace pointer is valid for the duration of the RPC request. that's the window, bestie. don't go holding onto it past that πŸ•


πŸ‘‘ SEE ALSO πŸ‘‘

  • Kernel file ./fs/nfsd/auth.c β€” go read it, iykyk πŸ“–

πŸ’œ cute little sign-off πŸ’œ

so this iconic little page lives in the ./fs/nfsd source tree, dated October 2026, and it's filed under nfsd_user_namespace(9) in the Kernel API Manual πŸŽ€ go forth and namespace responsibly, bestie, mwah πŸ’‹β­

πŸ“¦ where this page comes from