From 1dc4727ea33b75936addff9b1df15c15ef2ef697 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Mon, 13 Dec 2004 07:41:19 +0000 Subject: [PATCH] Another FNONBLOCK -> O_NONBLOCK. Don't unconditionally set IO_UNIT to device drivers in write: nobody checks it, and since it was always set it did not carry information anyway. --- sys/fs/devfs/devfs_vnops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c index 2ff7a79bcf1..4eba833bdba 100644 --- a/sys/fs/devfs/devfs_vnops.c +++ b/sys/fs/devfs/devfs_vnops.c @@ -1345,8 +1345,8 @@ devfs_write_f(struct file *fp, struct uio *uio, struct ucred *cred, int flags, s return (error); KASSERT(uio->uio_td == td, ("uio_td %p is not td %p", uio->uio_td, td)); vp = fp->f_vnode; - ioflag = IO_UNIT; - if (fp->f_flag & FNONBLOCK) + ioflag = 0; + if (fp->f_flag & O_NONBLOCK) ioflag |= IO_NDELAY; if (fp->f_flag & O_DIRECT) ioflag |= IO_DIRECT;