summaryrefslogtreecommitdiffstats
path: root/sys/fs/fdescfs
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2004-07-12 08:14:09 +0000
committeralfred <alfred@FreeBSD.org>2004-07-12 08:14:09 +0000
commit8a1713aada9c142d3c2096e4857ff30970d9b1d0 (patch)
tree8fe425c682e229149daf17e6533c0f750ba308d3 /sys/fs/fdescfs
parentb436785ed498fa322c5ccd228770c6053e4b487b (diff)
downloadFreeBSD-src-8a1713aada9c142d3c2096e4857ff30970d9b1d0.zip
FreeBSD-src-8a1713aada9c142d3c2096e4857ff30970d9b1d0.tar.gz
Make VFS_ROOT() and vflush() take a thread argument.
This is to allow filesystems to decide based on the passed thread which vnode to return. Several filesystems used curthread, they now use the passed thread.
Diffstat (limited to 'sys/fs/fdescfs')
-rw-r--r--sys/fs/fdescfs/fdesc.h4
-rw-r--r--sys/fs/fdescfs/fdesc_vfsops.c5
2 files changed, 5 insertions, 4 deletions
diff --git a/sys/fs/fdescfs/fdesc.h b/sys/fs/fdescfs/fdesc.h
index a6ffb51..dfe4c6b 100644
--- a/sys/fs/fdescfs/fdesc.h
+++ b/sys/fs/fdescfs/fdesc.h
@@ -58,8 +58,8 @@ struct fdescnode {
#define VFSTOFDESC(mp) ((struct fdescmount *)((mp)->mnt_data))
#define VTOFDESC(vp) ((struct fdescnode *)(vp)->v_data)
-extern int fdesc_init(struct vfsconf *);
-extern int fdesc_root(struct mount *, struct vnode **);
+extern vfs_init_t fdesc_init;
+extern vfs_root_t fdesc_root;
extern int fdesc_allocvp(fdntype, int, struct mount *, struct vnode **,
struct thread *);
#endif /* _KERNEL */
diff --git a/sys/fs/fdescfs/fdesc_vfsops.c b/sys/fs/fdescfs/fdesc_vfsops.c
index 18e7ccf..c6514a9 100644
--- a/sys/fs/fdescfs/fdesc_vfsops.c
+++ b/sys/fs/fdescfs/fdesc_vfsops.c
@@ -117,7 +117,7 @@ fdesc_unmount(mp, mntflags, td)
* There is 1 extra root vnode reference corresponding
* to f_root.
*/
- if ((error = vflush(mp, 1, flags)) != 0)
+ if ((error = vflush(mp, 1, flags, td)) != 0)
return (error);
/*
@@ -130,9 +130,10 @@ fdesc_unmount(mp, mntflags, td)
}
int
-fdesc_root(mp, vpp)
+fdesc_root(mp, vpp, td)
struct mount *mp;
struct vnode **vpp;
+ struct thread *td;
{
struct thread *td = curthread; /* XXX */
struct vnode *vp;
OpenPOWER on IntegriCloud