loop_global_lock_killable(9)
πΈ NAME πΈ
Okay so bestie, this is loop_global_lock_killable(9) from the Kernel API Manual β it does exactly this: take locks for a safe loop_validate_file() test. Slay. π
β¨ SYNOPSIS β¨
int loop_global_lock_killable (struct loop_device *lo , bool global );
π ARGUMENTS π
loβ astruct loop_device, iconic.globalβtrueiflois about to bind another"struct loop_device", andfalseotherwise.
π DESCRIPTION π
Returns 0 on success, and -EINTR otherwise. No cap. β¨
Since loop_validate_file traverses on other "struct loop_device" if is_loop_device is true, we need a global lock for serializing concurrent loop_configure/loop_change_fd/__loop_clr_fd calls. Like, that's the whole point, bestie β keep those concurrent calls from stepping on each other. π«Ά
π¦ SEE ALSO π¦
Kernel file ./drivers/block/loop.c:
Sign-off time π«Ά: source/version is ./drivers/block, dated October 2026 β that's the whole loop_global_lock_killable(9) page, 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