diff options
author | phk <phk@FreeBSD.org> | 2004-07-30 22:08:52 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-07-30 22:08:52 +0000 |
commit | 2d868d02cfcc9af8da398c52add2f28fe1c493bc (patch) | |
tree | af2a6b4c3e63a13443b647b947b57d5b31690b5a /sys/gnu | |
parent | 941a15ae99cc0252acd241ea5e407eb00a540858 (diff) | |
download | FreeBSD-src-2d868d02cfcc9af8da398c52add2f28fe1c493bc.zip FreeBSD-src-2d868d02cfcc9af8da398c52add2f28fe1c493bc.tar.gz |
Put a version element in the VFS filesystem configuration structure
and refuse initializing filesystems with a wrong version. This will
aid maintenance activites on the 5-stable branch.
s/vfs_mount/vfs_omount/
s/vfs_nmount/vfs_mount/
Name our filesystems mount function consistently.
Eliminate the namiedata argument to both vfs_mount and vfs_omount.
It was originally there to save stack space. A few places abused
it to get hold of some credentials to pass around. Effectively
it is unused.
Reorganize the root filesystem selection code.
Diffstat (limited to 'sys/gnu')
-rw-r--r-- | sys/gnu/ext2fs/ext2_vfsops.c | 10 | ||||
-rw-r--r-- | sys/gnu/fs/ext2fs/ext2_vfsops.c | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/sys/gnu/ext2fs/ext2_vfsops.c b/sys/gnu/ext2fs/ext2_vfsops.c index 73207d5..a1e5365 100644 --- a/sys/gnu/ext2fs/ext2_vfsops.c +++ b/sys/gnu/ext2fs/ext2_vfsops.c @@ -73,7 +73,7 @@ static vfs_fhtovp_t ext2_fhtovp; static vfs_vptofh_t ext2_vptofh; static vfs_init_t ext2_init; static vfs_uninit_t ext2_uninit; -static vfs_nmount_t ext2_mount; +static vfs_mount_t ext2_mount; MALLOC_DEFINE(M_EXT2NODE, "EXT2 node", "EXT2 vnode private part"); static MALLOC_DEFINE(M_EXT2MNT, "EXT2 mount", "EXT2 mount structure"); @@ -81,7 +81,7 @@ static MALLOC_DEFINE(M_EXT2MNT, "EXT2 mount", "EXT2 mount structure"); static struct vfsops ext2fs_vfsops = { .vfs_fhtovp = ext2_fhtovp, .vfs_init = ext2_init, - .vfs_nmount = ext2_mount, + .vfs_mount = ext2_mount, .vfs_root = ext2_root, /* root inode via vget */ .vfs_statfs = ext2_statfs, .vfs_sync = ext2_sync, @@ -166,9 +166,8 @@ ext2_mountroot() * mount system call */ static int -ext2_mount(mp, ndp, td) +ext2_mount(mp, td) struct mount *mp; - struct nameidata *ndp; struct thread *td; { struct export_args *export; @@ -180,6 +179,7 @@ ext2_mount(mp, ndp, td) size_t size; int error, flags, len; mode_t accessmode; + struct nameidata nd, *ndp = &nd; opts = mp->mnt_optnew; @@ -216,7 +216,7 @@ ext2_mount(mp, ndp, td) fs->s_rd_only = 1; } if (!error && (mp->mnt_flag & MNT_RELOAD)) - error = ext2_reload(mp, ndp->ni_cnd.cn_cred, td); + error = ext2_reload(mp, td->td_ucred, td); if (error) return (error); devvp = ump->um_devvp; diff --git a/sys/gnu/fs/ext2fs/ext2_vfsops.c b/sys/gnu/fs/ext2fs/ext2_vfsops.c index 73207d5..a1e5365 100644 --- a/sys/gnu/fs/ext2fs/ext2_vfsops.c +++ b/sys/gnu/fs/ext2fs/ext2_vfsops.c @@ -73,7 +73,7 @@ static vfs_fhtovp_t ext2_fhtovp; static vfs_vptofh_t ext2_vptofh; static vfs_init_t ext2_init; static vfs_uninit_t ext2_uninit; -static vfs_nmount_t ext2_mount; +static vfs_mount_t ext2_mount; MALLOC_DEFINE(M_EXT2NODE, "EXT2 node", "EXT2 vnode private part"); static MALLOC_DEFINE(M_EXT2MNT, "EXT2 mount", "EXT2 mount structure"); @@ -81,7 +81,7 @@ static MALLOC_DEFINE(M_EXT2MNT, "EXT2 mount", "EXT2 mount structure"); static struct vfsops ext2fs_vfsops = { .vfs_fhtovp = ext2_fhtovp, .vfs_init = ext2_init, - .vfs_nmount = ext2_mount, + .vfs_mount = ext2_mount, .vfs_root = ext2_root, /* root inode via vget */ .vfs_statfs = ext2_statfs, .vfs_sync = ext2_sync, @@ -166,9 +166,8 @@ ext2_mountroot() * mount system call */ static int -ext2_mount(mp, ndp, td) +ext2_mount(mp, td) struct mount *mp; - struct nameidata *ndp; struct thread *td; { struct export_args *export; @@ -180,6 +179,7 @@ ext2_mount(mp, ndp, td) size_t size; int error, flags, len; mode_t accessmode; + struct nameidata nd, *ndp = &nd; opts = mp->mnt_optnew; @@ -216,7 +216,7 @@ ext2_mount(mp, ndp, td) fs->s_rd_only = 1; } if (!error && (mp->mnt_flag & MNT_RELOAD)) - error = ext2_reload(mp, ndp->ni_cnd.cn_cred, td); + error = ext2_reload(mp, td->td_ucred, td); if (error) return (error); devvp = ump->um_devvp; |