diff options
author | Christoph Hellwig <hch@infradead.org> | 2007-08-29 11:44:18 +1000 |
---|---|---|
committer | Tim Shimmin <tes@chook.melbourne.sgi.com> | 2007-10-16 11:23:43 +1000 |
commit | 2f6f7b3d9b5600e1f6e7622c62ab30f36bd0f57f (patch) | |
tree | 06fe541eb0b90227a8a433d8e3cf66d621df7038 /fs/xfs/linux-2.6 | |
parent | 739bfb2a7dfa369324f74aad1d020d6e0775e4f0 (diff) | |
download | linux-2f6f7b3d9b5600e1f6e7622c62ab30f36bd0f57f.tar.gz linux-2f6f7b3d9b5600e1f6e7622c62ab30f36bd0f57f.tar.bz2 linux-2f6f7b3d9b5600e1f6e7622c62ab30f36bd0f57f.zip |
[XFS] kill v_vfsp member from struct bhv_vnode
We can easily get at the vfsp through the super_block but it will soon be
gone anyway.
SGI-PV: 969608
SGI-Modid: xfs-linux-melb:xfs-kern:29494a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs/xfs/linux-2.6')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_file.c | 31 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_ioctl.c | 3 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_lrw.c | 2 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_super.c | 1 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_vnode.c | 4 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_vnode.h | 3 |
6 files changed, 21 insertions, 23 deletions
diff --git a/fs/xfs/linux-2.6/xfs_file.c b/fs/xfs/linux-2.6/xfs_file.c index 83707708ebb1..1d72dbb1a73d 100644 --- a/fs/xfs/linux-2.6/xfs_file.c +++ b/fs/xfs/linux-2.6/xfs_file.c @@ -261,7 +261,7 @@ xfs_file_mmap( vma->vm_flags |= VM_CAN_NONLINEAR; #ifdef CONFIG_XFS_DMAPI - if (vn_from_inode(filp->f_path.dentry->d_inode)->v_vfsp->vfs_flag & VFS_DMI) + if (vfs_from_sb(filp->f_path.dentry->d_inode->i_sb)->vfs_flag & VFS_DMI) vma->vm_ops = &xfs_dmapi_file_vm_ops; #endif /* CONFIG_XFS_DMAPI */ @@ -320,16 +320,14 @@ xfs_vm_mprotect( struct vm_area_struct *vma, unsigned int newflags) { - bhv_vnode_t *vp = vn_from_inode(vma->vm_file->f_path.dentry->d_inode); + struct inode *inode = vma->vm_file->f_path.dentry->d_inode; + bhv_vfs_t *vfsp = vfs_from_sb(inode->i_sb); int error = 0; - if (vp->v_vfsp->vfs_flag & VFS_DMI) { + if (vfsp->vfs_flag & VFS_DMI) { if ((vma->vm_flags & VM_MAYSHARE) && - (newflags & VM_WRITE) && !(vma->vm_flags & VM_WRITE)) { - xfs_mount_t *mp = XFS_VFSTOM(vp->v_vfsp); - - error = XFS_SEND_MMAP(mp, vma, VM_WRITE); - } + (newflags & VM_WRITE) && !(vma->vm_flags & VM_WRITE)) + error = XFS_SEND_MMAP(XFS_VFSTOM(vfsp), vma, VM_WRITE); } return error; } @@ -346,18 +344,17 @@ STATIC int xfs_file_open_exec( struct inode *inode) { - bhv_vnode_t *vp = vn_from_inode(inode); + bhv_vfs_t *vfsp = vfs_from_sb(inode->i_sb); - if (unlikely(vp->v_vfsp->vfs_flag & VFS_DMI)) { - xfs_mount_t *mp = XFS_VFSTOM(vp->v_vfsp); - xfs_inode_t *ip = xfs_vtoi(vp); + if (unlikely(vfsp->vfs_flag & VFS_DMI)) { + if (DM_EVENT_ENABLED(XFS_I(inode), DM_EVENT_READ)) { + bhv_vnode_t *vp = vn_from_inode(inode); - if (!ip) - return -EINVAL; - if (DM_EVENT_ENABLED(ip, DM_EVENT_READ)) - return -XFS_SEND_DATA(mp, DM_EVENT_READ, vp, - 0, 0, 0, NULL); + return -XFS_SEND_DATA(XFS_VFSTOM(vfsp), DM_EVENT_READ, + vp, 0, 0, 0, NULL); + } } + return 0; } #endif /* HAVE_FOP_OPEN_EXEC */ diff --git a/fs/xfs/linux-2.6/xfs_ioctl.c b/fs/xfs/linux-2.6/xfs_ioctl.c index 9bba9f8be1eb..8ff465db909b 100644 --- a/fs/xfs/linux-2.6/xfs_ioctl.c +++ b/fs/xfs/linux-2.6/xfs_ioctl.c @@ -138,7 +138,8 @@ xfs_find_handle( vp = vn_from_inode(inode); /* now we can grab the fsid */ - memcpy(&handle.ha_fsid, vp->v_vfsp->vfs_altfsid, sizeof(xfs_fsid_t)); + memcpy(&handle.ha_fsid, XFS_MTOVFS(XFS_I(inode)->i_mount)->vfs_altfsid, + sizeof(xfs_fsid_t)); hsize = sizeof(xfs_fsid_t); if (cmd != XFS_IOC_PATH_TO_FSHANDLE) { diff --git a/fs/xfs/linux-2.6/xfs_lrw.c b/fs/xfs/linux-2.6/xfs_lrw.c index fb04b11bb815..5b95a7297fd1 100644 --- a/fs/xfs/linux-2.6/xfs_lrw.c +++ b/fs/xfs/linux-2.6/xfs_lrw.c @@ -621,7 +621,7 @@ xfs_write( io = &xip->i_iocore; mp = io->io_mount; - vfs_wait_for_freeze(vp->v_vfsp, SB_FREEZE_WRITE); + vfs_wait_for_freeze(XFS_MTOVFS(mp), SB_FREEZE_WRITE); if (XFS_FORCED_SHUTDOWN(mp)) return -EIO; diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c index 42d6ed1788ff..650c24ab27e2 100644 --- a/fs/xfs/linux-2.6/xfs_super.c +++ b/fs/xfs/linux-2.6/xfs_super.c @@ -210,7 +210,6 @@ xfs_initialize_vnode( struct inode *inode = vn_to_inode(vp); if (!ip->i_vnode) { - vp->v_vfsp = bhvtovfs(bdp); ip->i_vnode = vp; inode->i_private = ip; } diff --git a/fs/xfs/linux-2.6/xfs_vnode.c b/fs/xfs/linux-2.6/xfs_vnode.c index ad0494c5c0d1..342c57879901 100644 --- a/fs/xfs/linux-2.6/xfs_vnode.c +++ b/fs/xfs/linux-2.6/xfs_vnode.c @@ -69,8 +69,10 @@ vn_ioerror( char *f, int l) { + bhv_vfs_t *vfsp = vfs_from_sb(vp->v_inode.i_sb); + if (unlikely(error == -ENODEV)) - bhv_vfs_force_shutdown(vp->v_vfsp, SHUTDOWN_DEVICE_REQ, f, l); + bhv_vfs_force_shutdown(vfsp, SHUTDOWN_DEVICE_REQ, f, l); } bhv_vnode_t * diff --git a/fs/xfs/linux-2.6/xfs_vnode.h b/fs/xfs/linux-2.6/xfs_vnode.h index 5abcbd198d73..0f9ba6585c86 100644 --- a/fs/xfs/linux-2.6/xfs_vnode.h +++ b/fs/xfs/linux-2.6/xfs_vnode.h @@ -35,11 +35,10 @@ typedef enum bhv_vflags { /* * MP locking protocols: - * v_flag, v_vfsp VN_LOCK/VN_UNLOCK + * v_flag, VN_LOCK/VN_UNLOCK */ typedef struct bhv_vnode { bhv_vflags_t v_flag; /* vnode flags (see above) */ - bhv_vfs_t *v_vfsp; /* ptr to containing VFS */ bhv_vnumber_t v_number; /* in-core vnode number */ spinlock_t v_lock; /* VN_LOCK/VN_UNLOCK */ atomic_t v_iocount; /* outstanding I/O count */ |