kernel - Fix serious bug w/non-blocking commit
authorMatthew Dillon <dillon@apollo.backplane.com>
Thu, 24 Feb 2011 04:59:59 +0000 (20:59 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Thu, 24 Feb 2011 04:59:59 +0000 (20:59 -0800)
* 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 <me@endeavour.zapto.org>
sys/vfs/hammer/hammer_vnops.c

index ba7f37a..161aabc 100644 (file)
@@ -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);
                }