aboutsummaryrefslogtreecommitdiff
path: root/sys/gnu/fs/ext2fs
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2004-07-30 22:08:52 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2004-07-30 22:08:52 +0000
commit5e8c582ac2973e6389d6f9ae62021546bef75705 (patch)
treeaf2a6b4c3e63a13443b647b947b57d5b31690b5a /sys/gnu/fs/ext2fs
parent483745339df4f3ed4c4e99d11ad87ec6b2e66c41 (diff)
downloadsrc-5e8c582ac2973e6389d6f9ae62021546bef75705.tar.gz
src-5e8c582ac2973e6389d6f9ae62021546bef75705.zip
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.
Notes
Notes: svn path=/head/; revision=132902
Diffstat (limited to 'sys/gnu/fs/ext2fs')
-rw-r--r--sys/gnu/fs/ext2fs/ext2_vfsops.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/gnu/fs/ext2fs/ext2_vfsops.c b/sys/gnu/fs/ext2fs/ext2_vfsops.c
index 73207d5a2d12..a1e5365bdcae 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;