summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_syscalls.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/vfs_syscalls.c')
-rw-r--r--sys/kern/vfs_syscalls.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index 75ac3d0..539c418 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -1704,15 +1704,14 @@ lseek(td, uap)
} */ *uap;
{
struct ucred *cred = td->td_proc->p_ucred;
- register struct file *fp;
+ struct file *fp;
struct vnode *vp;
struct vattr vattr;
off_t offset;
int error, noneg;
- fp = ffind_hold(td, uap->fd);
- if (fp == NULL)
- return (EBADF);
+ if ((error = fget(td, uap->fd, &fp)) != 0)
+ return (error);
if (fp->f_type != DTYPE_VNODE) {
fdrop(fp, td);
return (ESPIPE);
OpenPOWER on IntegriCloud