diff options
author | attilio <attilio@FreeBSD.org> | 2009-05-11 15:33:26 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2009-05-11 15:33:26 +0000 |
commit | 1dcb84131b6679f5d53452314d4ca1dfe2d8c5f0 (patch) | |
tree | 6591f00318da636f44a6ceb26f517e7795eb1b44 /sys/fs/nullfs | |
parent | ebcb20267286e4ffadb3f603af56bd7a1df1f422 (diff) | |
download | FreeBSD-src-1dcb84131b6679f5d53452314d4ca1dfe2d8c5f0.zip FreeBSD-src-1dcb84131b6679f5d53452314d4ca1dfe2d8c5f0.tar.gz |
Remove the thread argument from the FSD (File-System Dependent) parts of
the VFS. Now all the VFS_* functions and relating parts don't want the
context as long as it always refers to curthread.
In some points, in particular when dealing with VOPs and functions living
in the same namespace (eg. vflush) which still need to be converted,
pass curthread explicitly in order to retain the old behaviour.
Such loose ends will be fixed ASAP.
While here fix a bug: now, UFS_EXTATTR can be compiled alone without the
UFS_EXTATTR_AUTOSTART option.
VFS KPI is heavilly changed by this commit so thirdy parts modules needs
to be recompiled. Bump __FreeBSD_version in order to signal such
situation.
Diffstat (limited to 'sys/fs/nullfs')
-rw-r--r-- | sys/fs/nullfs/null_vfsops.c | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c index 841c9ca..7bd4ab7 100644 --- a/sys/fs/nullfs/null_vfsops.c +++ b/sys/fs/nullfs/null_vfsops.c @@ -69,7 +69,7 @@ static vfs_extattrctl_t nullfs_extattrctl; * Mount null layer */ static int -nullfs_mount(struct mount *mp, struct thread *td) +nullfs_mount(struct mount *mp) { int error = 0; struct vnode *lowerrootvp, *vp; @@ -115,8 +115,7 @@ nullfs_mount(struct mount *mp, struct thread *td) /* * Find lower node */ - NDINIT(ndp, LOOKUP, FOLLOW|LOCKLEAF, - UIO_SYSSPACE, target, td); + NDINIT(ndp, LOOKUP, FOLLOW|LOCKLEAF, UIO_SYSSPACE, target, curthread); error = namei(ndp); /* * Re-lock vnode. @@ -200,10 +199,9 @@ nullfs_mount(struct mount *mp, struct thread *td) * Free reference to null layer */ static int -nullfs_unmount(mp, mntflags, td) +nullfs_unmount(mp, mntflags) struct mount *mp; int mntflags; - struct thread *td; { void *mntdata; int error; @@ -215,7 +213,7 @@ nullfs_unmount(mp, mntflags, td) flags |= FORCECLOSE; /* There is 1 extra root vnode reference (nullm_rootvp). */ - error = vflush(mp, 1, flags, td); + error = vflush(mp, 1, flags, curthread); if (error) return (error); @@ -229,11 +227,10 @@ nullfs_unmount(mp, mntflags, td) } static int -nullfs_root(mp, flags, vpp, td) +nullfs_root(mp, flags, vpp) struct mount *mp; int flags; struct vnode **vpp; - struct thread *td; { struct vnode *vp; @@ -257,21 +254,19 @@ nullfs_root(mp, flags, vpp, td) } static int -nullfs_quotactl(mp, cmd, uid, arg, td) +nullfs_quotactl(mp, cmd, uid, arg) struct mount *mp; int cmd; uid_t uid; void *arg; - struct thread *td; { - return VFS_QUOTACTL(MOUNTTONULLMOUNT(mp)->nullm_vfs, cmd, uid, arg, td); + return VFS_QUOTACTL(MOUNTTONULLMOUNT(mp)->nullm_vfs, cmd, uid, arg); } static int -nullfs_statfs(mp, sbp, td) +nullfs_statfs(mp, sbp) struct mount *mp; struct statfs *sbp; - struct thread *td; { int error; struct statfs mstat; @@ -282,7 +277,7 @@ nullfs_statfs(mp, sbp, td) bzero(&mstat, sizeof(mstat)); - error = VFS_STATFS(MOUNTTONULLMOUNT(mp)->nullm_vfs, &mstat, td); + error = VFS_STATFS(MOUNTTONULLMOUNT(mp)->nullm_vfs, &mstat); if (error) return (error); @@ -300,10 +295,9 @@ nullfs_statfs(mp, sbp, td) } static int -nullfs_sync(mp, waitfor, td) +nullfs_sync(mp, waitfor) struct mount *mp; int waitfor; - struct thread *td; { /* * XXX - Assumes no data cached at null layer. @@ -341,16 +335,15 @@ nullfs_fhtovp(mp, fidp, vpp) } static int -nullfs_extattrctl(mp, cmd, filename_vp, namespace, attrname, td) +nullfs_extattrctl(mp, cmd, filename_vp, namespace, attrname) struct mount *mp; int cmd; struct vnode *filename_vp; int namespace; const char *attrname; - struct thread *td; { return VFS_EXTATTRCTL(MOUNTTONULLMOUNT(mp)->nullm_vfs, cmd, filename_vp, - namespace, attrname, td); + namespace, attrname); } |