ioat(4): Set __result_use_check on ioat_acquire_reserve

Even M_WAITOK callers must check for failure.  For example, if the device is
quiescing, either due to automatic error-recovery induced reset, or due to
administrative detach, the routine will return ENXIO and the acquire
reference will not be held.  So, there is no mode in which it is safe to
assume the routine succeeds without checking.

Sponsored by:	Dell EMC Isilon
This commit is contained in:
Conrad Meyer 2019-01-17 23:21:02 +00:00
parent 5e84b57828
commit 236b57fe36
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=343125

View File

@ -173,7 +173,8 @@ void ioat_release(bus_dmaengine_t dmaengine);
*
* On failure, the caller does not hold the dmaengine.
*/
int ioat_acquire_reserve(bus_dmaengine_t dmaengine, unsigned n, int mflags);
int ioat_acquire_reserve(bus_dmaengine_t dmaengine, unsigned n, int mflags)
__result_use_check;
/*
* Issue a blockfill operation. The 64-bit pattern 'fillpattern' is written to