Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Apr 2009 05:19:35 +0000 (UTC)
From:      Kip Macy <kmacy@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r190958 - head/sys/kern
Message-ID:  <200904120519.n3C5JZ7H011694@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kmacy
Date: Sun Apr 12 05:19:35 2009
New Revision: 190958
URL: http://svn.freebsd.org/changeset/base/190958

Log:
  sendfile doesn't modify the vnode - acquire vnode lock shared
  
  Reviewed by:	ups, jeffr

Modified:
  head/sys/kern/uipc_syscalls.c

Modified: head/sys/kern/uipc_syscalls.c
==============================================================================
--- head/sys/kern/uipc_syscalls.c	Sun Apr 12 05:04:02 2009	(r190957)
+++ head/sys/kern/uipc_syscalls.c	Sun Apr 12 05:19:35 2009	(r190958)
@@ -1811,7 +1811,7 @@ kern_sendfile(struct thread *td, struct 
 	if ((error = fgetvp_read(td, uap->fd, &vp)) != 0)
 		goto out;
 	vfslocked = VFS_LOCK_GIANT(vp->v_mount);
-	vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
+	vn_lock(vp, LK_SHARED | LK_RETRY);
 	if (vp->v_type == VREG) {
 		obj = vp->v_object;
 		if (obj != NULL) {



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