summaryrefslogtreecommitdiffstats
path: root/sys/ufs
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/ufs
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/ufs')
-rw-r--r--sys/ufs/ffs/ffs_vfsops.c6
-rw-r--r--sys/ufs/ufs/ufs_extattr.c2
-rw-r--r--sys/ufs/ufs/ufs_vfsops.c3
3 files changed, 6 insertions, 5 deletions
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index af3ca97..2ed939d4 100644
--- a/sys/ufs/ffs/ffs_vfsops.c
+++ b/sys/ufs/ffs/ffs_vfsops.c
@@ -1003,7 +1003,7 @@ ffs_flushfiles(mp, flags, td)
#ifdef QUOTA
if (mp->mnt_flag & MNT_QUOTA) {
int i;
- error = vflush(mp, 0, SKIPSYSTEM|flags);
+ error = vflush(mp, 0, SKIPSYSTEM|flags, td);
if (error)
return (error);
for (i = 0; i < MAXQUOTAS; i++) {
@@ -1019,7 +1019,7 @@ ffs_flushfiles(mp, flags, td)
#endif
ASSERT_VOP_LOCKED(ump->um_devvp, "ffs_flushfiles");
if (ump->um_devvp->v_vflag & VV_COPYONWRITE) {
- if ((error = vflush(mp, 0, SKIPSYSTEM | flags)) != 0)
+ if ((error = vflush(mp, 0, SKIPSYSTEM | flags, td)) != 0)
return (error);
ffs_snapshot_unmount(mp);
/*
@@ -1030,7 +1030,7 @@ ffs_flushfiles(mp, flags, td)
/*
* Flush all the files.
*/
- if ((error = vflush(mp, 0, flags)) != 0)
+ if ((error = vflush(mp, 0, flags, td)) != 0)
return (error);
/*
* Flush filesystem metadata.
diff --git a/sys/ufs/ufs/ufs_extattr.c b/sys/ufs/ufs/ufs_extattr.c
index f31d927..e78ea93 100644
--- a/sys/ufs/ufs/ufs_extattr.c
+++ b/sys/ufs/ufs/ufs_extattr.c
@@ -472,7 +472,7 @@ ufs_extattr_autostart(struct mount *mp, struct thread *td)
* Does UFS_EXTATTR_FSROOTSUBDIR exist off the filesystem root?
* If so, automatically start EA's.
*/
- error = VFS_ROOT(mp, &rvp);
+ error = VFS_ROOT(mp, &rvp, td);
if (error) {
printf("ufs_extattr_autostart.VFS_ROOT() returned %d\n",
error);
diff --git a/sys/ufs/ufs/ufs_vfsops.c b/sys/ufs/ufs/ufs_vfsops.c
index 6466677..8876e51 100644
--- a/sys/ufs/ufs/ufs_vfsops.c
+++ b/sys/ufs/ufs/ufs_vfsops.c
@@ -80,9 +80,10 @@ ufs_start(mp, flags, td)
* Return the root of a filesystem.
*/
int
-ufs_root(mp, vpp)
+ufs_root(mp, vpp, td)
struct mount *mp;
struct vnode **vpp;
+ struct thread *td;
{
struct vnode *nvp;
int error;
OpenPOWER on IntegriCloud