Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Dec 2011 20:10:01 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r228593 - head/sys/kern
Message-ID:  <201112162010.pBGKA1mW024944@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Fri Dec 16 20:10:00 2011
New Revision: 228593
URL: http://svn.freebsd.org/changeset/base/228593

Log:
  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

Modified:
  head/sys/kern/vfs_syscalls.c

Modified: head/sys/kern/vfs_syscalls.c
==============================================================================
--- head/sys/kern/vfs_syscalls.c	Fri Dec 16 19:39:49 2011	(r228592)
+++ head/sys/kern/vfs_syscalls.c	Fri Dec 16 20:10:00 2011	(r228593)
@@ -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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201112162010.pBGKA1mW024944>