summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_subr.c
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/kern/vfs_subr.c
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/kern/vfs_subr.c')
-rw-r--r--sys/kern/vfs_subr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index c0dff88..53403db 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -2258,7 +2258,7 @@ vdropl(vp)
*
* `rootrefs' specifies the base reference count for the root vnode
* of this filesystem. The root vnode is considered busy if its
- * v_usecount exceeds this value. On a successful return, vflush()
+ * v_usecount exceeds this value. On a successful return, vflush(, td)
* will call vrele() on the root vnode exactly rootrefs times.
* If the SKIPSYSTEM or WRITECLOSE flags are specified, rootrefs must
* be zero.
@@ -2269,12 +2269,12 @@ SYSCTL_INT(_debug, OID_AUTO, busyprt, CTLFLAG_RW, &busyprt, 0, "");
#endif
int
-vflush(mp, rootrefs, flags)
+vflush(mp, rootrefs, flags, td)
struct mount *mp;
int rootrefs;
int flags;
+ struct thread *td;
{
- struct thread *td = curthread; /* XXX */
struct vnode *vp, *nvp, *rootvp = NULL;
struct vattr vattr;
int busy = 0, error;
@@ -2286,7 +2286,7 @@ vflush(mp, rootrefs, flags)
* Get the filesystem root vnode. We can vput() it
* immediately, since with rootrefs > 0, it won't go away.
*/
- if ((error = VFS_ROOT(mp, &rootvp)) != 0)
+ if ((error = VFS_ROOT(mp, &rootvp, td)) != 0)
return (error);
vput(rootvp);
OpenPOWER on IntegriCloud