summaryrefslogtreecommitdiffstats
path: root/sys/ufs
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1997-08-16 19:16:27 +0000
committerwollman <wollman@FreeBSD.org>1997-08-16 19:16:27 +0000
commit4542c1cf5d7077caf33d6d9468f5e647cd9d19e5 (patch)
tree69fd093ef1e8c080592999507b664fe6315c0e10 /sys/ufs
parentf4edc7fc6748272644fb845fc8636a5c261247d6 (diff)
downloadFreeBSD-src-4542c1cf5d7077caf33d6d9468f5e647cd9d19e5.zip
FreeBSD-src-4542c1cf5d7077caf33d6d9468f5e647cd9d19e5.tar.gz
Fix all areas of the system (or at least all those in LINT) to avoid storing
socket addresses in mbufs. (Socket buffers are the one exception.) A number of kernel APIs needed to get fixed in order to make this happen. Also, fix three protocol families which kept PCBs in mbufs to not malloc them instead. Delete some old compatibility cruft while we're at it, and add some new routines in the in_cksum family.
Diffstat (limited to 'sys/ufs')
-rw-r--r--sys/ufs/ffs/ffs_extern.h7
-rw-r--r--sys/ufs/ffs/ffs_vfsops.c4
-rw-r--r--sys/ufs/lfs/lfs_vfsops.c8
-rw-r--r--sys/ufs/ufs/ufs_extern.h9
-rw-r--r--sys/ufs/ufs/ufs_vfsops.c4
5 files changed, 16 insertions, 16 deletions
diff --git a/sys/ufs/ffs/ffs_extern.h b/sys/ufs/ffs/ffs_extern.h
index 8d14f3a..5c6a519 100644
--- a/sys/ufs/ffs/ffs_extern.h
+++ b/sys/ufs/ffs/ffs_extern.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ffs_extern.h 8.6 (Berkeley) 3/30/95
- * $Id$
+ * $Id: ffs_extern.h,v 1.15 1997/02/22 09:47:02 peter Exp $
*/
#ifndef _UFS_FFS_EXTERN_H
@@ -58,11 +58,10 @@ struct buf;
struct fid;
struct fs;
struct inode;
-struct mbuf;
struct mount;
+struct sockaddr;
struct statfs;
struct vnode;
-struct mbuf;
int ffs_alloc __P((struct inode *,
ufs_daddr_t, ufs_daddr_t, int, struct ucred *, ufs_daddr_t *));
@@ -73,7 +72,7 @@ void ffs_blkfree __P((struct inode *, ufs_daddr_t, long));
ufs_daddr_t ffs_blkpref __P((struct inode *, ufs_daddr_t, int, ufs_daddr_t *));
int ffs_bmap __P((struct vop_bmap_args *));
void ffs_clrblock __P((struct fs *, u_char *, ufs_daddr_t));
-int ffs_fhtovp __P((struct mount *, struct fid *, struct mbuf *,
+int ffs_fhtovp __P((struct mount *, struct fid *, struct sockaddr *,
struct vnode **, int *, struct ucred **));
int ffs_flushfiles __P((struct mount *, int, struct proc *));
void ffs_fragacct __P((struct fs *, int, int32_t [], int));
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index e552c7e..ef256be 100644
--- a/sys/ufs/ffs/ffs_vfsops.c
+++ b/sys/ufs/ffs/ffs_vfsops.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ffs_vfsops.c 8.31 (Berkeley) 5/20/95
- * $Id: ffs_vfsops.c,v 1.51 1997/03/23 20:08:19 guido Exp $
+ * $Id: ffs_vfsops.c,v 1.52 1997/03/24 11:25:07 bde Exp $
*/
#include "opt_quota.h"
@@ -1046,7 +1046,7 @@ int
ffs_fhtovp(mp, fhp, nam, vpp, exflagsp, credanonp)
register struct mount *mp;
struct fid *fhp;
- struct mbuf *nam;
+ struct sockaddr *nam;
struct vnode **vpp;
int *exflagsp;
struct ucred **credanonp;
diff --git a/sys/ufs/lfs/lfs_vfsops.c b/sys/ufs/lfs/lfs_vfsops.c
index b1c1c0e..b4fef3d 100644
--- a/sys/ufs/lfs/lfs_vfsops.c
+++ b/sys/ufs/lfs/lfs_vfsops.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)lfs_vfsops.c 8.20 (Berkeley) 6/10/95
- * $Id: lfs_vfsops.c,v 1.19 1997/03/24 11:25:08 bde Exp $
+ * $Id: lfs_vfsops.c,v 1.20 1997/08/02 14:33:21 bde Exp $
*/
#include "opt_quota.h"
@@ -58,7 +58,7 @@
#include <ufs/lfs/lfs.h>
#include <ufs/lfs/lfs_extern.h>
-static int lfs_fhtovp __P((struct mount *, struct fid *, struct mbuf *,
+static int lfs_fhtovp __P((struct mount *, struct fid *, struct sockaddr *,
struct vnode **, int *, struct ucred **));
static int lfs_mount __P((struct mount *, char *, caddr_t,
struct nameidata *, struct proc *));
@@ -91,9 +91,9 @@ VFS_SET(lfs_vfsops, lfs, MOUNT_LFS, 0);
/*
* Called by main() when ufs is going to be mounted as root.
*/
+int
lfs_mountroot()
{
- extern struct vnode *rootvp;
struct fs *fs;
struct mount *mp;
struct proc *p = curproc; /* XXX */
@@ -683,7 +683,7 @@ static int
lfs_fhtovp(mp, fhp, nam, vpp, exflagsp, credanonp)
register struct mount *mp;
struct fid *fhp;
- struct mbuf *nam;
+ struct sockaddr *nam;
struct vnode **vpp;
int *exflagsp;
struct ucred **credanonp;
diff --git a/sys/ufs/ufs/ufs_extern.h b/sys/ufs/ufs/ufs_extern.h
index 8e71f91..e1f38af 100644
--- a/sys/ufs/ufs/ufs_extern.h
+++ b/sys/ufs/ufs/ufs_extern.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ufs_extern.h 8.10 (Berkeley) 5/14/95
- * $Id$
+ * $Id: ufs_extern.h,v 1.14 1997/02/22 09:47:46 peter Exp $
*/
#ifndef _UFS_UFS_EXTERN_H_
@@ -42,10 +42,10 @@ struct direct;
struct fid;
struct flock;
struct inode;
-struct mbuf;
struct mount;
struct nameidata;
struct proc;
+struct sockaddr;
struct ucred;
struct uio;
struct vattr;
@@ -58,8 +58,9 @@ int ufs_advlock __P((struct vop_advlock_args *));
int ufs_bmap __P((struct vop_bmap_args *));
int ufs_bmaparray __P((struct vnode *, daddr_t, daddr_t *, struct indir *,
int *, int *, int *));
-int ufs_check_export __P((struct mount *, struct ufid *, struct mbuf *,
- struct vnode **, int *exflagsp, struct ucred **));
+int ufs_check_export __P((struct mount *, struct ufid *,
+ struct sockaddr *, struct vnode **,
+ int *exflagsp, struct ucred **));
int ufs_checkpath __P((struct inode *, struct inode *, struct ucred *));
int ufs_close __P((struct vop_close_args *));
int ufs_create __P((struct vop_create_args *));
diff --git a/sys/ufs/ufs/ufs_vfsops.c b/sys/ufs/ufs/ufs_vfsops.c
index ba994b8..ffc61f2 100644
--- a/sys/ufs/ufs/ufs_vfsops.c
+++ b/sys/ufs/ufs/ufs_vfsops.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)ufs_vfsops.c 8.8 (Berkeley) 5/20/95
- * $Id: ufs_vfsops.c,v 1.8 1997/02/22 09:47:52 peter Exp $
+ * $Id: ufs_vfsops.c,v 1.9 1997/08/02 14:33:24 bde Exp $
*/
#include "opt_quota.h"
@@ -187,7 +187,7 @@ int
ufs_check_export(mp, ufhp, nam, vpp, exflagsp, credanonp)
register struct mount *mp;
struct ufid *ufhp;
- struct mbuf *nam;
+ struct sockaddr *nam;
struct vnode **vpp;
int *exflagsp;
struct ucred **credanonp;
OpenPOWER on IntegriCloud