FIXES 4892
don't mark an mmapped RO as an execOrWriter.
(void)afs_close(vcp, vmap->vm_file->f_flags, credp);
/* only decrement the execsOrWriters flag if this is not a
* writable file. */
- if (!(vmap->vm_file->f_flags & (FWRITE | FTRUNC)))
- vcp->execsOrWriters--;
+ if (!(vcp->states & CRO) )
+ if (! (vmap->vm_file->f_flags & (FWRITE | FTRUNC)))
+ vcp->execsOrWriters--;
vcp->states &= ~CMAPPED;
crfree(credp);
} else if ((vmap->vm_file->f_flags & (FWRITE | FTRUNC)))
/* Add an open reference on the first mapping. */
if (vcp->mapcnt == 0) {
- vcp->execsOrWriters++;
+ if (!(vcp->states & CRO))
+ vcp->execsOrWriters++;
vcp->opens++;
vcp->states |= CMAPPED;
}