ksmbd_vfs_kern_path(9)
π ksmbd_vfs_kern_path(9) π
okay so bestie, this is the ksmbd_vfs_kern_path(9) page from the Kernel API Manual, and it's lowkey iconic. It's a little lookup function with big "do not assume too much" energy. It ate. Let's get into it. π«Άβ¨
π NAME π
ksmbd_vfs_kern_path β lookup a file and get path info. That's the name, that's the job, slay, no cap.
β¨ SYNOPSIS β¨
int ksmbd_vfs_kern_path (struct ksmbd_work *work , char *filepath ,
unsigned int flags , struct path *path , bool caseless );
π ARGUMENTS π
workβwork. That's literally the whole description, and I respect the minimalism. πfilepathβ the file path that is relative to share. The docs say relative to share, so keep that in mind, bestie.flagsβ lookup flags.pathβ if lookup succeed, return path info. So when the lookup works, the path info comes back here. β¨caselessβ caseless filename lookup.
π¦ DESCRIPTION π¦
It performs the lookup, possibly crossing over any mount point. So yeah, it may hop across mount points while it's doing its thing.
On return, no locks will be held, and write-access to filesystem won't have been checked. That's the important caveat, bestie β don't assume write access got cleared, because it literally was not checked. π
π RETURN π
0 if file was found, otherwise error. Found = 0; anything else = error. Periodt. π
π SEE ALSO π
- Kernel file
./fs/smb/server/vfs.c 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_lookup_in_dir(9)ksmbd_vfs_kern_path_start_removing(9)ksmbd_vfs_init_kstat(9)
mwah π signing off from source ./fs/smb/server, with the Kernel API Manual vibe and date October 2026. ksmbd_vfs_kern_path(9) out. πβ¨
π¦ 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