lease_none_upgrade(9)
π lease_none_upgrade(9) β the kernel API glow-up you didn't know you needed
okay so bestie, welcome to lease_none_upgrade, a page straight out of the Kernel API Manual β¨ and honestly? it's giving "tiny function, big responsibilities." no cap.
πΈ NAME πΈ
lease_none_upgrade β the function that upgrades the lease state from none. like going from "i have zero plans tonight" to "actually i'm booked and busy" π
π¦ SYNOPSIS π¦
int lease_none_upgrade (struct oplock_info *opinfo , __le32 new_state );
yes that's the whole thing. short, sweet, and absolutely doing the most in the background π
π§ ARGUMENTS π§
opinfoβ the current lease info. your main character struct, the one holding all the lore πnew_stateβ the new lease state. the glow-up destination, type__le32and all π
β RETURN β
0β slay, it worked, success β¨- otherwise
-EINVALβ nope, invalid, we are not doing that today π
π SEE ALSO π
the whole friend group, fr fr β the kernel file ./fs/smb/server/oplock.c and literally everyone it hangs out with:
alloc_opinfo(9)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)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 i said. big friend group. iykyk π«Ά
don't ghost the SEE ALSO list bestie β every single one of those is a real reference and they all live in ./fs/smb/server/oplock.c. go read them, they're literally iconic.
mwah π that's the page! brought to you by the fine folks over at ./fs/smb/server, dated October 2026, and yes the version is giving future-tech main character energy. stay hydrated, upgrade those lease states responsibly, and remember: 0 on success, otherwise -EINVAL. 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