[XFS] Avoid directly referencing the VFS inode.

In several places we directly convert from the XFS inode
to the linux (VFS) inode by a simple deference of ip->i_vnode.
We should not do this - a helper function should be used to
extract the VFS inode from the XFS inode.

Introduce the function VFS_I() to extract the VFS inode
from the XFS inode. The name was chosen to match XFS_I() which
is used to extract the XFS inode from the VFS inode.

SGI-PV: 981498

SGI-Modid: xfs-linux-melb:xfs-kern:31720a

Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
This commit is contained in:
David Chinner
2008-08-13 15:45:15 +10:00
committed by Lachlan McIlroy
parent 3790689fa3
commit 0165164625
9 changed files with 41 additions and 30 deletions

View File

@@ -1106,7 +1106,7 @@ void
xfs_flush_inode(
xfs_inode_t *ip)
{
struct inode *inode = ip->i_vnode;
struct inode *inode = VFS_I(ip);
igrab(inode);
xfs_syncd_queue_work(ip->i_mount, inode, xfs_flush_inode_work);
@@ -1825,7 +1825,7 @@ xfs_fs_fill_super(
sb->s_time_gran = 1;
set_posix_acl_flag(sb);
root = igrab(mp->m_rootip->i_vnode);
root = igrab(VFS_I(mp->m_rootip));
if (!root) {
error = ENOENT;
goto fail_unmount;