mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Be sure to always return 0 for negative access requests.
Reported by: Maciej Kucharz <qk@comp.waw.pl>
This commit is contained in:
parent
6c35773729
commit
7aefe57c5c
1 changed files with 8 additions and 0 deletions
|
|
@ -2366,6 +2366,14 @@ g_mirror_access(struct g_provider *pp, int acr, int acw, int ace)
|
|||
G_MIRROR_EVENT_DONTWAIT);
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Be sure to return 0 for negativate access requests.
|
||||
* In case of some HW problems, it is possible that we don't have
|
||||
* any active disk here, so loop above will be no-op and error will
|
||||
* be ENXIO.
|
||||
*/
|
||||
if (error != 0 && acr <= 0 && acw <= 0 && ace <= 0)
|
||||
error = 0;
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue