commit | eb72d0bb84eee5d0dc3044fd17b75e7101dabb57 | [log] [tgz] |
---|---|---|
author | Hannes Reinecke <hare@suse.de> | Tue Apr 26 08:06:58 2016 +0200 |
committer | Martin K. Petersen <martin.petersen@oracle.com> | Sun May 22 14:53:06 2016 -0400 |
tree | 746f6c67d19372ca2b336027a4e5b1f8d8be6e62 | |
parent | a621bac3044ed6f7ec5fa0326491b2d4838bfa93 [diff] |
sd: get disk reference in sd_check_events() sd_check_events() is called asynchronously, and might race with device removal. So always take a disk reference when processing the event to avoid the device being removed while the event is processed. Signed-off-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Ewan D. Milne <emilne@redhat.com> Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>