summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_syscalls.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2011-12-16 20:10:00 +0000
committerjhb <jhb@FreeBSD.org>2011-12-16 20:10:00 +0000
commitfa881e0cf43250a9ce6bfd0b201aa2f0cb9405cb (patch)
tree1b81f8c01b54c04b78484a2ab46ec3ab117553b8 /sys/kern/vfs_syscalls.c
parentf5113f1990a5953147a816c687dabac7df3ae568 (diff)
downloadFreeBSD-src-fa881e0cf43250a9ce6bfd0b201aa2f0cb9405cb.zip
FreeBSD-src-fa881e0cf43250a9ce6bfd0b201aa2f0cb9405cb.tar.gz
Fire a kevent if necessary after seeking on a regular file. This fixes a
case where a kevent would not fire on a regular file if an application read to EOF and then seeked backwards into the file. Reviewed by: kib MFC after: 2 weeks
Diffstat (limited to 'sys/kern/vfs_syscalls.c')
-rw-r--r--sys/kern/vfs_syscalls.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index 50319bd..d56e631 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -2050,6 +2050,7 @@ sys_lseek(td, uap)
if (error != 0)
goto drop;
fp->f_offset = offset;
+ VFS_KNOTE_UNLOCKED(vp, 0);
*(off_t *)(td->td_retval) = fp->f_offset;
drop:
fdrop(fp, td);
OpenPOWER on IntegriCloud