lease_read_to_write(9)
π lease_read_to_write(9) π
okay bestie, welcome to the Kernel API Manual β¨ this one's a little function from the kernel side of things, and it's lowkey a glow-up story. We're taking a lease and upgrading it β read to write, main character energy only π
π NAME π
lease_read_to_write β upgrade lease state from read to write. That's it, that's the whole vibe. She takes a read lease and gives it a whole new wardrobe π₯
β¨ SYNOPSIS β¨
int lease_read_to_write (struct oplock_info *opinfo );
(yes, the space before that last ) is canon, don't come for her π)
π¦ ARGUMENTS π¦
opinfoβ the current lease info. Like, the lease you're holding right now, the one that's about to get upgraded. She's the subject of the makeover π«Ά
πΈ RETURN πΈ
0 on success, otherwise -EINVAL. Periodt. If you get 0 you ate π if you get -EINVAL... something about it was not it, and the kernel is telling you so π
π SEE ALSO π
okay so this is the extended friend group, and we're not leaving a single one out π«Ά here's the whole group chat:
Kernel file ./fs/smb/server/oplock.c, plus:
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_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)
ngl bestie, read the whole list before you go poking at lease states β the upgrade only makes sense in context, iykyk π
okay bye ily, this page came straight out of ./fs/smb/server and it's dated October 2026 π go forth and upgrade responsibly β¨π
π¦ 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