From 9e6f3bfc84985f675f33b8a95b66aef7b2c7bd7e Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Wed, 23 Feb 2011 20:59:59 -0800 Subject: [PATCH] kernel - Fix serious bug w/non-blocking commit * NDELAY isn't supposed to make HAMMER do non-block disk I/O, NRDELAY is the only one that does that. * Fixes tons and tons of confusion (named, vi, tons of other programs that open regular files O_NONBLOCK). Requested-by: Venkatesh Srinivas --- sys/vfs/hammer/hammer_vnops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/vfs/hammer/hammer_vnops.c b/sys/vfs/hammer/hammer_vnops.c index ba7f37ae3b..161aabce61 100644 --- a/sys/vfs/hammer/hammer_vnops.c +++ b/sys/vfs/hammer/hammer_vnops.c @@ -375,7 +375,7 @@ hammer_vop_read(struct vop_read_args *ap) error = 0; goto skip; } else { - if (ap->a_ioflag & (IO_NDELAY | IO_NRDELAY)) + if (ap->a_ioflag & IO_NRDELAY) return (EWOULDBLOCK); } -- 2.41.0