Re: [PATCH] block: fix deadlock between sd_remove & sd_release

From: Bart Van Assche
Date: Wed Jul 17 2024 - 12:23:36 EST


On 7/17/24 3:15 AM, YangYang wrote:
These sysfs nodes are in different directories, the scsi node located
at /sys/bus/scsi/devices/0:0:0:0 and the gendisk node located at
/sys/block/sda. Would it be necessary to wait for the completion of
the scsi sysfs nodes' read/write operations before removing the
gendisk sysfs node?

No. sysfs_remove_files() waits for pending read and write operations to
complete.

Bart.