ksmbd_vfs_lookup_in_dir(9)
β¨ ksmbd_vfs_lookup_in_dir(9) β¨
okay bestie, settle in π this one's a page from the Kernel API Manual and it's literally all about ksmbd_vfs_lookup_in_dir β the girl whose whole job is finding a file inside a directory π
π NAME
ksmbd_vfs_lookup_in_dir β lookup a file in a directory π¦
Like, that's it. That's the whole gig. She looks. She finds. She slays. β¨
πΈ SYNOPSIS
int ksmbd_vfs_lookup_in_dir (const struct path *dir , char *name ,
size_t namelen , struct unicode_map *um );
yes the signature is giving "spread across two lines for the aesthetic" and honestly? iconic π«Ά copy it exactly, no cap.
π ARGUMENTS
dirβ the path info, aka where the vibe check happens. This is the directory she's snooping around in πnameβ the filename to look up. the one she's searching for, main character energy πnamelenβ the filename length. gotta tell her how much ofnameactually counts, fr frumβ thestruct unicode_mapto use. yes, unicode mapping matters, iykyk π
π₯ RETURN
0 on success β otherwise, an error π that's the whole contract bestie, no plot twist.
π¦ SEE ALSO
Kernel file ./fs/smb/server/vfs.c β go read her whole friend group, they're all linked up π:
ksmbd_vfs_create(9)ksmbd_vfs_mkdir(9)check_lock_range(9)ksmbd_vfs_read(9)ksmbd_vfs_write(9)ksmbd_vfs_getattr(9)ksmbd_vfs_fsync(9)ksmbd_vfs_remove_file(9)ksmbd_vfs_link(9)ksmbd_vfs_truncate(9)ksmbd_vfs_listxattr(9)ksmbd_vfs_getxattr(9)ksmbd_vfs_setxattr(9)ksmbd_vfs_set_fadvise(9)ksmbd_vfs_empty_dir(9)ksmbd_vfs_kern_path(9)ksmbd_vfs_kern_path_start_removing(9)ksmbd_vfs_init_kstat(9)
the whole squad, assembled π§ββοΈπ«
lowkey reminder: she returns 0 on success and an error otherwise β that's the return contract, so don't go inventing extra success codes, bestie π
alright that's the page π this little gem lives over in ./fs/smb/server, dated October 2026, and it's filed under Kernel API Manual β ksmbd_vfs_lookup_in_dir(9) ate and left absolutely no crumbs πβ¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms