diff options
author | kmacy <kmacy@FreeBSD.org> | 2009-04-12 05:19:35 +0000 |
---|---|---|
committer | kmacy <kmacy@FreeBSD.org> | 2009-04-12 05:19:35 +0000 |
commit | 0cb01ac4efbe6bb5e86d45975514931ea0d7b400 (patch) | |
tree | 1f18f418e2da1905a6c969238c423518f01e46c8 /sys/kern/uipc_syscalls.c | |
parent | 67650d3061c5c591e9e966ddee3e607e583ae500 (diff) | |
download | FreeBSD-src-0cb01ac4efbe6bb5e86d45975514931ea0d7b400.zip FreeBSD-src-0cb01ac4efbe6bb5e86d45975514931ea0d7b400.tar.gz |
sendfile doesn't modify the vnode - acquire vnode lock shared
Reviewed by: ups, jeffr
Diffstat (limited to 'sys/kern/uipc_syscalls.c')
-rw-r--r-- | sys/kern/uipc_syscalls.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index 2233e65..662b3abd 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -1811,7 +1811,7 @@ kern_sendfile(struct thread *td, struct sendfile_args *uap, 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) { |