From 560aa751e0f5cfef868bdf3fab01cdbc5169ef82 Mon Sep 17 00:00:00 2001 From: kib Date: Mon, 22 Oct 2012 17:50:54 +0000 Subject: Remove the support for using non-mpsafe filesystem modules. In particular, do not lock Giant conditionally when calling into the filesystem module, remove the VFS_LOCK_GIANT() and related macros. Stop handling buffers belonging to non-mpsafe filesystems. The VFS_VERSION is bumped to indicate the interface change which does not result in the interface signatures changes. Conducted and reviewed by: attilio Tested by: pho --- sys/i386/ibcs2/ibcs2_misc.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'sys/i386/ibcs2') diff --git a/sys/i386/ibcs2/ibcs2_misc.c b/sys/i386/ibcs2/ibcs2_misc.c index b72d252..0692122 100644 --- a/sys/i386/ibcs2/ibcs2_misc.c +++ b/sys/i386/ibcs2/ibcs2_misc.c @@ -331,7 +331,7 @@ ibcs2_getdents(td, uap) struct iovec aiov; struct ibcs2_dirent idb; off_t off; /* true file offset */ - int buflen, error, eofflag, vfslocked; + int buflen, error, eofflag; u_long *cookies = NULL, *cookiep; int ncookies; #define BSD_DIRENT(cp) ((struct dirent *)(cp)) @@ -345,9 +345,7 @@ ibcs2_getdents(td, uap) return (EBADF); } vp = fp->f_vnode; - vfslocked = VFS_LOCK_GIANT(vp->v_mount); if (vp->v_type != VDIR) { /* XXX vnode readdir op should do this */ - VFS_UNLOCK_GIANT(vfslocked); fdrop(fp, td); return (EINVAL); } @@ -464,7 +462,6 @@ eof: td->td_retval[0] = uap->nbytes - resid; out: VOP_UNLOCK(vp, 0); - VFS_UNLOCK_GIANT(vfslocked); fdrop(fp, td); if (cookies) free(cookies, M_TEMP); @@ -490,7 +487,7 @@ ibcs2_read(td, uap) char name[14]; } idb; off_t off; /* true file offset */ - int buflen, error, eofflag, size, vfslocked; + int buflen, error, eofflag, size; u_long *cookies = NULL, *cookiep; int ncookies; @@ -506,9 +503,7 @@ ibcs2_read(td, uap) return (EBADF); } vp = fp->f_vnode; - vfslocked = VFS_LOCK_GIANT(vp->v_mount); if (vp->v_type != VDIR) { - VFS_UNLOCK_GIANT(vfslocked); fdrop(fp, td); return sys_read(td, (struct read_args *)uap); } @@ -631,7 +626,6 @@ eof: td->td_retval[0] = uap->nbytes - resid; out: VOP_UNLOCK(vp, 0); - VFS_UNLOCK_GIANT(vfslocked); fdrop(fp, td); if (cookies) free(cookies, M_TEMP); -- cgit v1.1