diff options
author | David Chinner <david@fromorbit.com> | 2008-08-13 01:45:15 -0400 |
---|---|---|
committer | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-08-13 01:45:15 -0400 |
commit | 016516462575d28fab3354f762cad16c86c09116 (patch) | |
tree | ef644fe09f5eb963df28ad7e7bda3d547cae46d1 /fs/xfs/linux-2.6/xfs_super.c | |
parent | 3790689fa3c771bba6bafb7dee3e8389dd0b55bc (diff) |
[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>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_super.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_super.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c index 30ae96397e31..b49722940d6d 100644 --- a/fs/xfs/linux-2.6/xfs_super.c +++ b/fs/xfs/linux-2.6/xfs_super.c | |||
@@ -1106,7 +1106,7 @@ void | |||
1106 | xfs_flush_inode( | 1106 | xfs_flush_inode( |
1107 | xfs_inode_t *ip) | 1107 | xfs_inode_t *ip) |
1108 | { | 1108 | { |
1109 | struct inode *inode = ip->i_vnode; | 1109 | struct inode *inode = VFS_I(ip); |
1110 | 1110 | ||
1111 | igrab(inode); | 1111 | igrab(inode); |
1112 | xfs_syncd_queue_work(ip->i_mount, inode, xfs_flush_inode_work); | 1112 | xfs_syncd_queue_work(ip->i_mount, inode, xfs_flush_inode_work); |
@@ -1825,7 +1825,7 @@ xfs_fs_fill_super( | |||
1825 | sb->s_time_gran = 1; | 1825 | sb->s_time_gran = 1; |
1826 | set_posix_acl_flag(sb); | 1826 | set_posix_acl_flag(sb); |
1827 | 1827 | ||
1828 | root = igrab(mp->m_rootip->i_vnode); | 1828 | root = igrab(VFS_I(mp->m_rootip)); |
1829 | if (!root) { | 1829 | if (!root) { |
1830 | error = ENOENT; | 1830 | error = ENOENT; |
1831 | goto fail_unmount; | 1831 | goto fail_unmount; |