- assert(fd > 0);
-
- /* This drops all windows that include space right of the
- * specified offset. This is useful to ensure that after the
- * file size is extended we drop our mappings of the end and
- * create it anew, since otherwise it is undefined whether
- * mapping will continue to work as intended. */
-
- r = mmap_cache_peek_fd_index(m, fd, &fd_index);
- if (r <= 0)
- return;
-
- for (c = 0; c < m->contexts_max; c++) {
- w = m->by_context[c];
-
- if (w != (unsigned) -1 && m->windows[w].fd == fd)
- mmap_cache_context_unset(m, c);
- }
-
- w = m->by_fd[fd_index].windows;
- while (w != (unsigned) -1) {
- Window *v;