summaryrefslogtreecommitdiffstats
path: root/sys/compat/linux
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2012-10-22 17:50:54 +0000
committerkib <kib@FreeBSD.org>2012-10-22 17:50:54 +0000
commit560aa751e0f5cfef868bdf3fab01cdbc5169ef82 (patch)
tree6e9ef0a47c5e91d26227820c50c9767e84550821 /sys/compat/linux
parentca71b68ea40c83f641d6485e027368568f244197 (diff)
downloadFreeBSD-src-560aa751e0f5cfef868bdf3fab01cdbc5169ef82.zip
FreeBSD-src-560aa751e0f5cfef868bdf3fab01cdbc5169ef82.tar.gz
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
Diffstat (limited to 'sys/compat/linux')
-rw-r--r--sys/compat/linux/linux_file.c5
-rw-r--r--sys/compat/linux/linux_misc.c11
2 files changed, 4 insertions, 12 deletions
diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c
index 8003ade..df13277 100644
--- a/sys/compat/linux/linux_file.c
+++ b/sys/compat/linux/linux_file.c
@@ -337,7 +337,7 @@ getdents_common(struct thread *td, struct linux_getdents64_args *args,
struct l_dirent64 *linux_dirent64;
int buflen, error, eofflag, nbytes, justone;
u_long *cookies = NULL, *cookiep;
- int ncookies, vfslocked;
+ int ncookies;
nbytes = args->count;
if (nbytes == 1) {
@@ -359,9 +359,7 @@ getdents_common(struct thread *td, struct linux_getdents64_args *args,
off = foffset_lock(fp, 0);
vp = fp->f_vnode;
- vfslocked = VFS_LOCK_GIANT(vp->v_mount);
if (vp->v_type != VDIR) {
- VFS_UNLOCK_GIANT(vfslocked);
foffset_unlock(fp, off, 0);
fdrop(fp, td);
return (EINVAL);
@@ -521,7 +519,6 @@ out:
free(cookies, M_TEMP);
VOP_UNLOCK(vp, 0);
- VFS_UNLOCK_GIANT(vfslocked);
foffset_unlock(fp, off, 0);
fdrop(fp, td);
free(buf, M_TEMP);
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c
index 50e2175..6da3b19 100644
--- a/sys/compat/linux/linux_misc.c
+++ b/sys/compat/linux/linux_misc.c
@@ -247,7 +247,7 @@ linux_uselib(struct thread *td, struct linux_uselib_args *args)
char *library;
ssize_t aresid;
int error;
- int locked, vfslocked;
+ int locked;
LCONVPATHEXIST(td, args->library, &library);
@@ -257,11 +257,10 @@ linux_uselib(struct thread *td, struct linux_uselib_args *args)
#endif
a_out = NULL;
- vfslocked = 0;
locked = 0;
vp = NULL;
- NDINIT(&ni, LOOKUP, ISOPEN | FOLLOW | LOCKLEAF | MPSAFE | AUDITVNODE1,
+ NDINIT(&ni, LOOKUP, ISOPEN | FOLLOW | LOCKLEAF | AUDITVNODE1,
UIO_SYSSPACE, library, td);
error = namei(&ni);
LFREEPATH(library);
@@ -269,7 +268,6 @@ linux_uselib(struct thread *td, struct linux_uselib_args *args)
goto cleanup;
vp = ni.ni_vp;
- vfslocked = NDHASGIANT(&ni);
NDFREE(&ni, NDF_ONLY_PNBUF);
/*
@@ -393,7 +391,6 @@ linux_uselib(struct thread *td, struct linux_uselib_args *args)
*/
locked = 0;
VOP_UNLOCK(vp, 0);
- VFS_UNLOCK_GIANT(vfslocked);
/*
* Check if file_offset page aligned. Currently we cannot handle
@@ -463,10 +460,8 @@ linux_uselib(struct thread *td, struct linux_uselib_args *args)
cleanup:
/* Unlock vnode if needed */
- if (locked) {
+ if (locked)
VOP_UNLOCK(vp, 0);
- VFS_UNLOCK_GIANT(vfslocked);
- }
/* Release the temporary mapping. */
if (a_out)
OpenPOWER on IntegriCloud