summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/libc/sys/fcntl.24
-rw-r--r--sys/kern/kern_descrip.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/sys/fcntl.2 b/lib/libc/sys/fcntl.2
index c174563..8e0ca73 100644
--- a/lib/libc/sys/fcntl.2
+++ b/lib/libc/sys/fcntl.2
@@ -28,7 +28,7 @@
.\" @(#)fcntl.2 8.2 (Berkeley) 1/12/94
.\" $FreeBSD$
.\"
-.Dd July 27, 2012
+.Dd February 8, 2013
.Dt FCNTL 2
.Os
.Sh NAME
@@ -171,7 +171,7 @@ argument,
which is rounded up to the nearest block size.
A zero value in
.Fa arg
-turns off read ahead.
+turns off read ahead, a negative value restores the system default.
.It Dv F_RDAHEAD
Equivalent to Darwin counterpart which sets read ahead amount of 128KB
when the third argument,
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index 87d75ea..fc74bdb 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -776,7 +776,7 @@ kern_fcntl(struct thread *td, int fd, int cmd, intptr_t arg)
}
fhold(fp);
FILEDESC_SUNLOCK(fdp);
- if (arg != 0) {
+ if (arg >= 0) {
vp = fp->f_vnode;
error = vn_lock(vp, LK_SHARED);
if (error != 0) {
OpenPOWER on IntegriCloud