alloc_opinfo(9)
π alloc_opinfo(9) β the kernel API manual, but make it cute
okay so bestie, welcome to alloc_opinfo(9) β a kernel API manual situation from the ./fs/smb/server girlies, dated October 2026. it's giving "one little helper function that holds the whole oplock household together" and honestly? iconic. let's get into it π
β¨ NAME β¨
alloc_opinfo β literally just allocates a brand-new opinfo object for oplock info. that's the whole job. she's a builder, a creator, a main character π«Ά
πΈ SYNOPSIS πΈ
struct oplock_info * alloc_opinfo (struct ksmbd_work *work , u64 id ,
__u16 Tid );
copy that exactly, bestie β we do not freestyle signatures in this house π
π¦ ARGUMENTS π¦
workβ the smb work. like, the whole work context that's doing the thing.idβ the fid of the open file. it's au64, she's got range β¨Tidβ the tree id of the connection. note the capitalT, she's fancy like that.
π RETURN π
you get the allocated opinfo object back on success π and on failure? NULL. no in-between, no participation trophy, just NULL. check your pointers, bestie π
π₯ SEE ALSO π₯
the kernel file ./fs/smb/server/oplock.c β that's the mothership π β plus this whole entire friend group of (9) functions:
opinfo_write_to_read(9)opinfo_read_handle_to_read(9)opinfo_write_to_none(9)opinfo_read_to_none(9)lease_read_to_write(9)lease_none_upgrade(9)close_id_del_oplock(9)grant_write_oplock(9)grant_read_oplock(9)grant_none_oplock(9)same_client_has_lease(9)__smb2_oplock_break_noti(9)smb2_oplock_break_noti(9)__smb2_lease_break_noti(9)smb2_lease_break_noti(9)smb_grant_oplock(9)smb_break_all_write_oplock(9)__smb_break_all_levII_oplock(9)smb_break_all_oplock(9)smb2_map_lease_to_oplock(9)create_lease_buf(9)parse_lease_state(9)smb2_find_context_vals(9)create_durable_rsp_buf(9)create_durable_v2_rsp_buf(9)create_mxac_rsp_buf(9)create_posix_rsp_buf(9)create_aapl_rsp_buf(9)lookup_lease_in_table(9)
like, all of them. every single one. no cap, I counted, they're all there π―
ok and that's the page!! no warnings, no bugs section, no deprecated anything β she's a clean, simple girlie. go allocate responsibly π§
and that's a wrap on alloc_opinfo(9)!! this little baby shipped from ./fs/smb/server, version/date October 2026, and yes the manpage is still literally titled alloc_opinfo(9) at the footer too because consistency is the vibe π mwah, stan kernel docs, periodt β¨π
π¦ 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