grant_read_oplock(9)
β¨ grant_read_oplock(9) β¨
okay so bestie, welcome to the Kernel API Manual β yes, we're doing kernel internals today, and honestly? it's giving main character energy. this one's called grant_read_oplock and it does exactly what it says on the tin: it hands out a level2 oplock</> or a read lease</>. that's it. that's the whole vibe. π
πΈ NAME πΈ
grant_read_oplock β grant level2 oplock or read lease. literally just that, no cap π
π¦ SYNOPSIS π¦
void grant_read_oplock (struct oplock_info *opinfo_new , struct
lease_ctx_info *lctx );
so it's a void function (meaning it hands nothing back to you, it's not that kind of girl) and she takes two args. slay.
π ARGUMENTS π
opinfo_newβ the brand-new oplock info object π«Ά like, the fresh little guy you're about to bless.lctxβ the lease context information β¨ all the deets she needs to know.
π RETURN π
0
yep. that's the whole return section. iconic behaviour honestly π
π₯ SEE ALSO π₯
okay this part is a whole friend group, buckle up:
Kernel file ./fs/smb/server/oplock.c, plus all of these besties:
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)lease_none_upgrade(9)close_id_del_oplock(9)grant_write_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)
go read them. iykyk ππ
and that's a wrap, bestie π§ this lil page lives at ./fs/smb/server and it's dated October 2026 β go off, grant_read_oplock(9), you ate π
π
π¦ 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