summaryrefslogtreecommitdiffstats
path: root/sys/fs/nwfs
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/nwfs
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/nwfs')
-rw-r--r--sys/fs/nwfs/nwfs_vfsops.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/fs/nwfs/nwfs_vfsops.c b/sys/fs/nwfs/nwfs_vfsops.c
index 3eb0f91..824ef4e 100644
--- a/sys/fs/nwfs/nwfs_vfsops.c
+++ b/sys/fs/nwfs/nwfs_vfsops.c
@@ -208,7 +208,7 @@ static int nwfs_mount(struct mount *mp, char *path, caddr_t data,
/* protect against invalid mount points */
nmp->m.mount_point[sizeof(nmp->m.mount_point)-1] = '\0';
vfs_getnewfsid(mp);
- error = nwfs_root(mp, &vp);
+ error = nwfs_root(mp, &vp, td);
if (error)
goto bad;
/*
@@ -238,7 +238,7 @@ nwfs_unmount(struct mount *mp, int mntflags, struct thread *td)
if (mntflags & MNT_FORCE)
flags |= FORCECLOSE;
/* There is 1 extra root vnode reference from nwfs_mount(). */
- error = vflush(mp, 1, flags);
+ error = vflush(mp, 1, flags, td);
if (error)
return (error);
conn = NWFSTOCONN(nmp);
@@ -257,13 +257,12 @@ nwfs_unmount(struct mount *mp, int mntflags, struct thread *td)
/* Return locked vnode to root of a filesystem */
static int
-nwfs_root(struct mount *mp, struct vnode **vpp) {
+nwfs_root(struct mount *mp, struct vnode **vpp, struct thread *td) {
struct vnode *vp;
struct nwmount *nmp;
struct nwnode *np;
struct ncp_conn *conn;
struct nw_entry_info fattr;
- struct thread *td = curthread;
struct ucred *cred = td->td_ucred;
int error, nsf, opt;
u_char vol;
OpenPOWER on IntegriCloud