Remove long dead code, specifically, code related to munmapfd().
(See also vm/vm_mmap.c revision 1.173.)
This commit is contained in:
parent
bf3ace5aca
commit
5752042760
@ -535,10 +535,6 @@ do_dup(td, type, old, new, retval)
|
||||
holdleaders = 0;
|
||||
KASSERT(delfp == NULL || type == DUP_FIXED,
|
||||
("dup() picked an open file"));
|
||||
#if 0
|
||||
if (delfp && (fdp->fd_ofileflags[new] & UF_MAPPED))
|
||||
(void) munmapfd(td, new);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Duplicate the source descriptor, update lastfile
|
||||
@ -830,10 +826,6 @@ close(td, uap)
|
||||
error = EBADF;
|
||||
goto done2;
|
||||
}
|
||||
#if 0
|
||||
if (fdp->fd_ofileflags[fd] & UF_MAPPED)
|
||||
(void) munmapfd(td, fd);
|
||||
#endif
|
||||
fdp->fd_ofiles[fd] = NULL;
|
||||
fdp->fd_ofileflags[fd] = 0;
|
||||
if (td->td_proc->p_fdtol != NULL) {
|
||||
@ -1587,10 +1579,6 @@ setugidsafety(td)
|
||||
if (fdp->fd_ofiles[i] && is_unsafe(fdp->fd_ofiles[i])) {
|
||||
struct file *fp;
|
||||
|
||||
#if 0
|
||||
if ((fdp->fd_ofileflags[i] & UF_MAPPED) != 0)
|
||||
(void) munmapfd(td, i);
|
||||
#endif
|
||||
if (i < fdp->fd_knlistsize) {
|
||||
FILEDESC_UNLOCK(fdp);
|
||||
knote_fdclose(td, i);
|
||||
@ -1641,10 +1629,6 @@ fdcloseexec(td)
|
||||
(fdp->fd_ofileflags[i] & UF_EXCLOSE)) {
|
||||
struct file *fp;
|
||||
|
||||
#if 0
|
||||
if (fdp->fd_ofileflags[i] & UF_MAPPED)
|
||||
(void) munmapfd(td, i);
|
||||
#endif
|
||||
if (i < fdp->fd_knlistsize) {
|
||||
FILEDESC_UNLOCK(fdp);
|
||||
knote_fdclose(td, i);
|
||||
@ -2177,10 +2161,6 @@ dupfdopen(td, fdp, indx, dfd, mode, error)
|
||||
return (EACCES);
|
||||
}
|
||||
fp = fdp->fd_ofiles[indx];
|
||||
#if 0
|
||||
if (fp && fdp->fd_ofileflags[indx] & UF_MAPPED)
|
||||
(void) munmapfd(td, indx);
|
||||
#endif
|
||||
fdp->fd_ofiles[indx] = wfp;
|
||||
fdp->fd_ofileflags[indx] = fdp->fd_ofileflags[dfd];
|
||||
fhold_locked(wfp);
|
||||
@ -2203,10 +2183,6 @@ dupfdopen(td, fdp, indx, dfd, mode, error)
|
||||
* Steal away the file pointer from dfd and stuff it into indx.
|
||||
*/
|
||||
fp = fdp->fd_ofiles[indx];
|
||||
#if 0
|
||||
if (fp && fdp->fd_ofileflags[indx] & UF_MAPPED)
|
||||
(void) munmapfd(td, indx);
|
||||
#endif
|
||||
fdp->fd_ofiles[indx] = fdp->fd_ofiles[dfd];
|
||||
fdp->fd_ofiles[dfd] = NULL;
|
||||
fdp->fd_ofileflags[indx] = fdp->fd_ofileflags[dfd];
|
||||
|
@ -118,9 +118,6 @@ struct filedesc_to_leader {
|
||||
* Per-process open flags.
|
||||
*/
|
||||
#define UF_EXCLOSE 0x01 /* auto-close on exec */
|
||||
#if 0
|
||||
#define UF_MAPPED 0x02 /* mapped from device */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Storage required per open file descriptor.
|
||||
|
@ -69,7 +69,6 @@ void kmem_free_wakeup(vm_map_t, vm_offset_t, vm_size_t);
|
||||
void kmem_init(vm_offset_t, vm_offset_t);
|
||||
vm_offset_t kmem_malloc(vm_map_t, vm_size_t, boolean_t);
|
||||
vm_map_t kmem_suballoc(vm_map_t, vm_offset_t *, vm_offset_t *, vm_size_t);
|
||||
void munmapfd(struct thread *, int);
|
||||
void swapout_procs(int);
|
||||
int useracc(void *, int, int);
|
||||
int vm_fault(vm_map_t, vm_offset_t, vm_prot_t, int);
|
||||
|
Loading…
Reference in New Issue
Block a user