Be sure to always return 0 for negative access requests.

Reported by:	Maciej Kucharz <qk@comp.waw.pl>
This commit is contained in:
Pawel Jakub Dawidek 2004-10-07 20:13:23 +00:00
parent 6c35773729
commit 7aefe57c5c

View file

@ -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);
}