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/kern/vfs_default.c | |
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/kern/vfs_default.c')
-rw-r--r-- | sys/kern/vfs_default.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c index 2fe64b3..bbaca4b 100644 --- a/sys/kern/vfs_default.c +++ b/sys/kern/vfs_default.c @@ -795,47 +795,45 @@ out: * used to fill the vfs function table to get reasonable default return values. */ int -vfs_stdroot (mp, flags, vpp, td) +vfs_stdroot (mp, flags, vpp) struct mount *mp; int flags; struct vnode **vpp; - struct thread *td; { return (EOPNOTSUPP); } int -vfs_stdstatfs (mp, sbp, td) +vfs_stdstatfs (mp, sbp) struct mount *mp; struct statfs *sbp; - struct thread *td; { return (EOPNOTSUPP); } int -vfs_stdquotactl (mp, cmds, uid, arg, td) +vfs_stdquotactl (mp, cmds, uid, arg) struct mount *mp; int cmds; uid_t uid; void *arg; - struct thread *td; { return (EOPNOTSUPP); } int -vfs_stdsync(mp, waitfor, td) +vfs_stdsync(mp, waitfor) struct mount *mp; int waitfor; - struct thread *td; { struct vnode *vp, *mvp; + struct thread *td; int error, lockreq, allerror = 0; + td = curthread; lockreq = LK_EXCLUSIVE | LK_INTERLOCK; if (waitfor != MNT_WAIT) lockreq |= LK_NOWAIT; @@ -872,10 +870,9 @@ loop: } int -vfs_stdnosync (mp, waitfor, td) +vfs_stdnosync (mp, waitfor) struct mount *mp; int waitfor; - struct thread *td; { return (0); @@ -919,13 +916,12 @@ vfs_stduninit (vfsp) } int -vfs_stdextattrctl(mp, cmd, filename_vp, attrnamespace, attrname, td) +vfs_stdextattrctl(mp, cmd, filename_vp, attrnamespace, attrname) struct mount *mp; int cmd; struct vnode *filename_vp; int attrnamespace; const char *attrname; - struct thread *td; { if (filename_vp != NULL) |