mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-31 16:57:10 +00:00
Make cam_periph_hold() behavior consistent: drop taken reference and
return ENXIO if periph was invalidated while we were waiting for it. MFC after: 1 week
This commit is contained in:
parent
10284c8b26
commit
aed9c88cff
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=237401
@ -440,6 +440,10 @@ cam_periph_hold(struct cam_periph *periph, int priority)
|
||||
cam_periph_release_locked(periph);
|
||||
return (error);
|
||||
}
|
||||
if (periph->flags & CAM_PERIPH_INVALID) {
|
||||
cam_periph_release_locked(periph);
|
||||
return (ENXIO);
|
||||
}
|
||||
}
|
||||
|
||||
periph->flags |= CAM_PERIPH_LOCKED;
|
||||
|
Loading…
Reference in New Issue
Block a user