scsi_device_put(9)
β¨ scsi_device_put β¨
okay so bestie, listen UP because this one's from the Kernel API Manual and it's literally the "letting go" era of scsi_device refcounting π
πΈ SYNOPSIS πΈ
void scsi_device_put (struct scsi_device *sdev );
π ARGUMENTS π
sdevβ the device you're releasing a reference on. that's the whole vibe. the target. the one you're saying bye to π«Ά
π DESCRIPTION π
So what does it actually do, you ask? Okay so: it releases a reference to the scsi_device and decrements the use count of the underlying LLDD module β two things, one function call, no cap π₯
And here's the iconic part: the device gets freed once the last user vanishes. Like, gone. Nobody's left holding a reference? The device is done for. main character final exit energy β¨
π ngl this is the "let it go" half of the refcount duo β everyscsi_device_getneeds itsscsi_device_putor the device never gets freed and that's not the vibe you want (iykyk)
π¦ SEE ALSO π¦
okay this is a LONG squad list, buckle up:
The kernel file ./drivers/scsi/scsi.c is where the magic lives, and here's everyone in the friend group π«Ά:
scsi_finish_command(9)scsi_change_queue_depth(9)scsi_track_queue_full(9)scsi_vpd_inquiry(9)scsi_get_vpd_page(9)scsi_get_vpd_buf(9)scsi_attach_vpd(9)scsi_report_opcode(9)scsi_cdl_check(9)scsi_cdl_enable(9)scsi_device_get(9)starget_for_each_device(9)__starget_for_each_device(9)__scsi_device_lookup_by_target(9)scsi_device_lookup_by_target(9)__scsi_device_lookup(9)scsi_device_lookup(9)
π signed, sealed, delivered by the ./drivers/scsi crew β version dated October 2026, no drama, just kernel refcounts slaying as always πβ¨
π¦ 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