diff options
| author | 2002-02-13 19:08:06 +0000 | |
|---|---|---|
| committer | 2002-02-13 19:08:06 +0000 | |
| commit | 2cc38fedad07e26699fd31f343d5325058c8d847 (patch) | |
| tree | 8cb82fa06cc657271a26abb480ea883cb7de524d /sys/compat/linux/linux_hdio.c | |
| parent | The syscall numer is quad to __syscall(2). (diff) | |
| download | wireguard-openbsd-2cc38fedad07e26699fd31f343d5325058c8d847.tar.xz wireguard-openbsd-2cc38fedad07e26699fd31f343d5325058c8d847.zip | |
More FREF/FRELE on relevant places. Now, only sys_mmap and a bunch of ioctl functions in sys/compat are left.
Diffstat (limited to 'sys/compat/linux/linux_hdio.c')
| -rw-r--r-- | sys/compat/linux/linux_hdio.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/compat/linux/linux_hdio.c b/sys/compat/linux/linux_hdio.c index 746d070822a..6ec57f064e6 100644 --- a/sys/compat/linux/linux_hdio.c +++ b/sys/compat/linux/linux_hdio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: linux_hdio.c,v 1.3 2002/02/08 00:03:46 art Exp $ */ +/* $OpenBSD: linux_hdio.c,v 1.4 2002/02/13 19:08:06 art Exp $ */ /* $NetBSD: linux_hdio.c,v 1.1 2000/12/10 14:12:17 fvdl Exp $ */ /* @@ -80,6 +80,7 @@ linux_ioctl_hdio(struct proc *p, struct linux_sys_ioctl_args *uap, if ((fp = fd_getfile(fdp, SCARG(uap, fd))) == NULL) return (EBADF); + FREF(fp); com = SCARG(uap, com); ioctlf = fp->f_ops->fo_ioctl; retval[0] = error = 0; @@ -104,8 +105,10 @@ linux_ioctl_hdio(struct proc *p, struct linux_sys_ioctl_args *uap, error = ioctlf(fp, ATAIOCCOMMAND, (caddr_t)&req, p); if (error != 0) break; - if (req.retsts != ATACMD_OK) - return EIO; + if (req.retsts != ATACMD_OK) { + error = EIO; + break; + } error = copyin(atap, &ata, sizeof ata); if (error != 0) break; @@ -175,5 +178,6 @@ linux_ioctl_hdio(struct proc *p, struct linux_sys_ioctl_args *uap, error = EINVAL; } + FRELE(fp); return error; } |
