vfs: correctly predict last fdrop on failed open

Arguably since the count is guaranteed to be 1 the code should be modified
to avoid the work.
This commit is contained in:
Mateusz Guzik 2020-12-13 21:28:15 +00:00
parent 203affb291
commit d48c2b8d29

View File

@ -1229,7 +1229,7 @@ success:
return (0);
bad:
KASSERT(indx == -1, ("indx=%d, should be -1", indx));
fdrop(fp, td);
fdrop_close(fp, td);
return (error);
}