diff options
Diffstat (limited to 'sys/vm/vm_mmap.c')
-rw-r--r-- | sys/vm/vm_mmap.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c index 9bf68c1..47c243f 100644 --- a/sys/vm/vm_mmap.c +++ b/sys/vm/vm_mmap.c @@ -292,11 +292,8 @@ mmap(td, uap) * sure it is of appropriate type. * don't let the descriptor disappear on us if we block */ - fp = ffind_hold(td, uap->fd); - if (fp == NULL) { - error = EBADF; + if ((error = fget(td, uap->fd, &fp)) != 0) goto done; - } if (fp->f_type != DTYPE_VNODE) { error = EINVAL; goto done; |