From 1dcb84131b6679f5d53452314d4ca1dfe2d8c5f0 Mon Sep 17 00:00:00 2001 From: attilio Date: Mon, 11 May 2009 15:33:26 +0000 Subject: 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. --- sys/kern/vfs_default.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'sys/kern/vfs_default.c') 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) -- cgit v1.1