lease_read_to_write(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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:


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