summaryrefslogtreecommitdiffstats
path: root/sys/gnu/fs/ext2fs/ext2_vfsops.c
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2009-05-11 15:33:26 +0000
committerattilio <attilio@FreeBSD.org>2009-05-11 15:33:26 +0000
commit1dcb84131b6679f5d53452314d4ca1dfe2d8c5f0 (patch)
tree6591f00318da636f44a6ceb26f517e7795eb1b44 /sys/gnu/fs/ext2fs/ext2_vfsops.c
parentebcb20267286e4ffadb3f603af56bd7a1df1f422 (diff)
downloadFreeBSD-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/gnu/fs/ext2fs/ext2_vfsops.c')
-rw-r--r--sys/gnu/fs/ext2fs/ext2_vfsops.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/sys/gnu/fs/ext2fs/ext2_vfsops.c b/sys/gnu/fs/ext2fs/ext2_vfsops.c
index 5f4a84a..c8d79fb 100644
--- a/sys/gnu/fs/ext2fs/ext2_vfsops.c
+++ b/sys/gnu/fs/ext2fs/ext2_vfsops.c
@@ -127,12 +127,12 @@ static const char *ext2_opts[] = { "from", "export", "acls", "noexec",
* mount system call
*/
static int
-ext2_mount(mp, td)
+ext2_mount(mp)
struct mount *mp;
- struct thread *td;
{
struct vfsoptlist *opts;
struct vnode *devvp;
+ struct thread *td;
struct ext2mount *ump = 0;
struct ext2_sb_info *fs;
char *path, *fspec;
@@ -140,6 +140,7 @@ ext2_mount(mp, td)
accmode_t accmode;
struct nameidata nd, *ndp = &nd;
+ td = curthread;
opts = mp->mnt_optnew;
if (vfs_filteropt(opts, ext2_opts))
@@ -165,7 +166,7 @@ ext2_mount(mp, td)
error = 0;
if (fs->s_rd_only == 0 &&
vfs_flagopt(opts, "ro", NULL, 0)) {
- error = VFS_SYNC(mp, MNT_WAIT, td);
+ error = VFS_SYNC(mp, MNT_WAIT);
if (error)
return (error);
flags = WRITECLOSE;
@@ -734,10 +735,9 @@ out:
* unmount system call
*/
static int
-ext2_unmount(mp, mntflags, td)
+ext2_unmount(mp, mntflags)
struct mount *mp;
int mntflags;
- struct thread *td;
{
struct ext2mount *ump;
struct ext2_sb_info *fs;
@@ -749,7 +749,7 @@ ext2_unmount(mp, mntflags, td)
return (EINVAL);
flags |= FORCECLOSE;
}
- if ((error = ext2_flushfiles(mp, flags, td)) != 0)
+ if ((error = ext2_flushfiles(mp, flags, curthread)) != 0)
return (error);
ump = VFSTOEXT2(mp);
fs = ump->um_e2fs;
@@ -810,10 +810,9 @@ ext2_flushfiles(mp, flags, td)
* taken from ext2/super.c ext2_statfs
*/
static int
-ext2_statfs(mp, sbp, td)
+ext2_statfs(mp, sbp)
struct mount *mp;
struct statfs *sbp;
- struct thread *td;
{
unsigned long overhead;
struct ext2mount *ump;
@@ -862,17 +861,18 @@ ext2_statfs(mp, sbp, td)
* Note: we are always called with the filesystem marked `MPBUSY'.
*/
static int
-ext2_sync(mp, waitfor, td)
+ext2_sync(mp, waitfor)
struct mount *mp;
int waitfor;
- struct thread *td;
{
struct vnode *mvp, *vp;
+ struct thread *td;
struct inode *ip;
struct ext2mount *ump = VFSTOEXT2(mp);
struct ext2_sb_info *fs;
int error, allerror = 0;
+ td = curthread;
fs = ump->um_e2fs;
if (fs->s_dirt != 0 && fs->s_rd_only != 0) { /* XXX */
printf("fs = %s\n", fs->fs_fsmnt);
@@ -1143,11 +1143,10 @@ printf("\nupdating superblock, waitfor=%s\n", waitfor == MNT_WAIT ? "yes":"no");
* Return the root of a filesystem.
*/
static int
-ext2_root(mp, flags, vpp, td)
+ext2_root(mp, flags, vpp)
struct mount *mp;
int flags;
struct vnode **vpp;
- struct thread *td;
{
struct vnode *nvp;
int error;
OpenPOWER on IntegriCloud