given that we can mark something invalid for future use, ever,
once we have done so for all fds, we ih_reallyclose is done.
don't persist the setting to the detriment of new fds
Change-Id: If82368dad79841a5d68f45a608b2645b32f951e7
Reviewed-on: http://gerrit.openafs.org/6101
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
*/
if (!ihP->ih_fdhead) {
ihP->ih_flags &= ~IH_REALLY_CLOSED;
+ } else {
+ FdHandle_t *lfdP, *next;
+ int clear = 1;
+ for (lfdP = ihP->ih_fdhead; lfdP != NULL; lfdP = next) {
+ next = lfdP->fd_ihnext;
+ osi_Assert(lfdP->fd_ih == ihP);
+ if (lfdP->fd_status != FD_HANDLE_CLOSING) {
+ clear = 0;
+ break;
+ }
+ }
+ /* no *future* fd should be subjected to this */
+ if (clear)
+ ihP->ih_flags &= ~IH_REALLY_CLOSED;
}
if (fdP->fd_refcnt == 0) {