From 09b996f480a43ad18cbd78c07730020d2f37d6f1 Mon Sep 17 00:00:00 2001 From: phk Date: Mon, 24 Jan 2005 21:51:19 +0000 Subject: Create a vp->v_object in VFS_FHTOVP() if we want to be exportable with NFS. We are moving responsibility for creating the vnode_pager object into the filesystems which own the vnode, and this is one of the places we have to cover. We call vnode_create_vobject() directly because we own the vnode. If we can get the size easily, pass it as an argument to save the call to VOP_GETATTR() in vnode_create_vobject() --- sys/fs/cd9660/cd9660_vfsops.c | 1 + sys/fs/msdosfs/msdosfs_vfsops.c | 1 + sys/fs/ntfs/ntfs_vfsops.c | 2 +- sys/fs/udf/udf_vfsops.c | 1 + sys/gnu/ext2fs/ext2_vfsops.c | 1 + sys/gnu/fs/ext2fs/ext2_vfsops.c | 1 + sys/isofs/cd9660/cd9660_vfsops.c | 1 + sys/ufs/ufs/ufs_vfsops.c | 1 + 8 files changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/fs/cd9660/cd9660_vfsops.c b/sys/fs/cd9660/cd9660_vfsops.c index 852a1a3..0c77a55 100644 --- a/sys/fs/cd9660/cd9660_vfsops.c +++ b/sys/fs/cd9660/cd9660_vfsops.c @@ -616,6 +616,7 @@ cd9660_fhtovp(mp, fhp, vpp) return (ESTALE); } *vpp = nvp; + vnode_create_vobject(*vpp, 0, curthread); return (0); } diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c index 91dfb5c..c01b1e8 100644 --- a/sys/fs/msdosfs/msdosfs_vfsops.c +++ b/sys/fs/msdosfs/msdosfs_vfsops.c @@ -940,6 +940,7 @@ msdosfs_fhtovp(mp, fhp, vpp) return (error); } *vpp = DETOV(dep); + vnode_create_vobject(*vpp, dep->de_FileSize, curthread); return (0); } diff --git a/sys/fs/ntfs/ntfs_vfsops.c b/sys/fs/ntfs/ntfs_vfsops.c index c602220..d7ff5e2 100644 --- a/sys/fs/ntfs/ntfs_vfsops.c +++ b/sys/fs/ntfs/ntfs_vfsops.c @@ -608,7 +608,7 @@ ntfs_fhtovp( /* XXX as unlink/rmdir/mkdir/creat are not currently possible * with NTFS, we don't need to check anything else for now */ *vpp = nvp; - + vnode_create_vobject(nvp, VTOF(nvp)->f_size, curthread); return (0); } diff --git a/sys/fs/udf/udf_vfsops.c b/sys/fs/udf/udf_vfsops.c index 6a815af..d39f0cc 100644 --- a/sys/fs/udf/udf_vfsops.c +++ b/sys/fs/udf/udf_vfsops.c @@ -705,6 +705,7 @@ udf_fhtovp(struct mount *mp, struct fid *fhp, struct vnode **vpp) } *vpp = nvp; + vnode_create_vobject(*vpp, 0, curthread); return (0); } diff --git a/sys/gnu/ext2fs/ext2_vfsops.c b/sys/gnu/ext2fs/ext2_vfsops.c index cb4e3c8..b3e50aa 100644 --- a/sys/gnu/ext2fs/ext2_vfsops.c +++ b/sys/gnu/ext2fs/ext2_vfsops.c @@ -1093,6 +1093,7 @@ ext2_fhtovp(mp, fhp, vpp) return (ESTALE); } *vpp = nvp; + vnode_create_vobject(*vpp, 0, curthread); return (0); } diff --git a/sys/gnu/fs/ext2fs/ext2_vfsops.c b/sys/gnu/fs/ext2fs/ext2_vfsops.c index cb4e3c8..b3e50aa 100644 --- a/sys/gnu/fs/ext2fs/ext2_vfsops.c +++ b/sys/gnu/fs/ext2fs/ext2_vfsops.c @@ -1093,6 +1093,7 @@ ext2_fhtovp(mp, fhp, vpp) return (ESTALE); } *vpp = nvp; + vnode_create_vobject(*vpp, 0, curthread); return (0); } diff --git a/sys/isofs/cd9660/cd9660_vfsops.c b/sys/isofs/cd9660/cd9660_vfsops.c index 852a1a3..0c77a55 100644 --- a/sys/isofs/cd9660/cd9660_vfsops.c +++ b/sys/isofs/cd9660/cd9660_vfsops.c @@ -616,6 +616,7 @@ cd9660_fhtovp(mp, fhp, vpp) return (ESTALE); } *vpp = nvp; + vnode_create_vobject(*vpp, 0, curthread); return (0); } diff --git a/sys/ufs/ufs/ufs_vfsops.c b/sys/ufs/ufs/ufs_vfsops.c index 3e57aa2..514ee1f 100644 --- a/sys/ufs/ufs/ufs_vfsops.c +++ b/sys/ufs/ufs/ufs_vfsops.c @@ -206,5 +206,6 @@ ufs_fhtovp(mp, ufhp, vpp) return (ESTALE); } *vpp = nvp; + vnode_create_vobject(*vpp, 0, curthread); return (0); } -- cgit v1.1