diff options
author | kib <kib@FreeBSD.org> | 2012-10-22 17:50:54 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2012-10-22 17:50:54 +0000 |
commit | 560aa751e0f5cfef868bdf3fab01cdbc5169ef82 (patch) | |
tree | 6e9ef0a47c5e91d26227820c50c9767e84550821 /sys/kern/kern_sig.c | |
parent | ca71b68ea40c83f641d6485e027368568f244197 (diff) | |
download | FreeBSD-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/kern/kern_sig.c')
-rw-r--r-- | sys/kern/kern_sig.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index deb2098..4749a85 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -3123,11 +3123,10 @@ nomem: int error, n; int flags = O_CREAT | O_EXCL | FWRITE | O_NOFOLLOW; int cmode = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP; - int vfslocked; for (n = 0; n < num_cores; n++) { temp[indexpos] = '0' + n; - NDINIT(&nd, LOOKUP, NOFOLLOW | MPSAFE, UIO_SYSSPACE, + NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, temp, td); error = vn_open(&nd, &flags, cmode, NULL); if (error) { @@ -3141,11 +3140,9 @@ nomem: free(temp, M_TEMP); return (NULL); } - vfslocked = NDHASGIANT(&nd); NDFREE(&nd, NDF_ONLY_PNBUF); VOP_UNLOCK(nd.ni_vp, 0); error = vn_close(nd.ni_vp, FWRITE, td->td_ucred, td); - VFS_UNLOCK_GIANT(vfslocked); if (error) { log(LOG_ERR, "pid %d (%s), uid (%u): Path `%s' failed " @@ -3182,7 +3179,6 @@ coredump(struct thread *td) struct mount *mp; char *name; /* name of corefile */ off_t limit; - int vfslocked; int compress; #ifdef COMPRESS_USER_CORES @@ -3232,7 +3228,7 @@ coredump(struct thread *td) PROC_UNLOCK(p); restart: - NDINIT(&nd, LOOKUP, NOFOLLOW | MPSAFE, UIO_SYSSPACE, name, td); + NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, name, td); flags = O_CREAT | FWRITE | O_NOFOLLOW; error = vn_open_cred(&nd, &flags, S_IRUSR | S_IWUSR, VN_OPEN_NOAUDIT, cred, NULL); @@ -3243,7 +3239,6 @@ restart: free(name, M_TEMP); return (error); } - vfslocked = NDHASGIANT(&nd); NDFREE(&nd, NDF_ONLY_PNBUF); vp = nd.ni_vp; @@ -3270,7 +3265,6 @@ restart: goto out; if ((error = vn_start_write(NULL, &mp, V_XSLEEP | PCATCH)) != 0) goto out; - VFS_UNLOCK_GIANT(vfslocked); goto restart; } @@ -3303,7 +3297,6 @@ out: audit_proc_coredump(td, name, error); #endif free(name, M_TEMP); - VFS_UNLOCK_GIANT(vfslocked); return (error); } |