- if (!perm) {
- OFLLOCK();
- if (f->prev) f->prev->next = f->next;
- if (f->next) f->next->prev = f->prev;
- if (ofl_head == f) ofl_head = f->next;
- OFLUNLOCK();
- }
+ /* Past this point, f is closed and any further explict access
+ * to it is undefined. However, it still exists as an entry in
+ * the open file list and possibly in the thread's locked files
+ * list, if it was closed while explicitly locked. Functions
+ * which process these lists must tolerate dead FILE objects
+ * (which necessarily have inactive buffer pointers) without
+ * producing any side effects. */