From 10f666af84d48e89e4e2960415c9b616fce4077f Mon Sep 17 00:00:00 2001 From: dyson Date: Mon, 10 Feb 1997 02:22:35 +0000 Subject: This is the kernel Lite/2 commit. There are some requisite userland changes, so don't expect to be able to run the kernel as-is (very well) without the appropriate Lite/2 userland changes. The system boots and can mount UFS filesystems. Untested: ext2fs, msdosfs, NFS Known problems: Incorrect Berkeley ID strings in some files. Mount_std mounts will not work until the getfsent library routine is changed. Reviewed by: various people Submitted by: Jeffery Hsu --- sys/compat/linux/linux_file.c | 4 ++-- sys/compat/linux/linux_misc.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'sys/compat') diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index 55c8a35..9fe4d40 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -450,7 +450,7 @@ linux_getdents(struct proc *p, struct linux_getdents_args *args, int *retval) buflen = max(DIRBLKSIZ, nbytes + blockoff); buflen = min(buflen, MAXBSIZE); buf = malloc(buflen, M_TEMP, M_WAITOK); - VOP_LOCK(vp); + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p); again: aiov.iov_base = buf; aiov.iov_len = buflen; @@ -530,7 +530,7 @@ again: eof: *retval = nbytes - resid; out: - VOP_UNLOCK(vp); + VOP_UNLOCK(vp, p); free(buf, M_TEMP); return error; } diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 536d797..d0332cf 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -237,7 +237,7 @@ linux_uselib(struct proc *p, struct linux_uselib_args *args, int *retval) /* * Lock no longer needed */ - VOP_UNLOCK(vp); + VOP_UNLOCK(vp, p); locked = 0; /* @@ -392,7 +392,7 @@ cleanup: * Unlock vnode if needed */ if (locked) - VOP_UNLOCK(vp); + VOP_UNLOCK(vp, p); /* * Release the kernel mapping. -- cgit v1.1