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/xfs_utils.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/xfs_utils.c')
-rw-r--r-- | fs/xfs/xfs_utils.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/xfs_utils.c b/fs/xfs/xfs_utils.c index 98e5f110ba5f..35d4d414bcc2 100644 --- a/fs/xfs/xfs_utils.c +++ b/fs/xfs/xfs_utils.c | |||
@@ -237,7 +237,7 @@ xfs_droplink( | |||
237 | 237 | ||
238 | ASSERT (ip->i_d.di_nlink > 0); | 238 | ASSERT (ip->i_d.di_nlink > 0); |
239 | ip->i_d.di_nlink--; | 239 | ip->i_d.di_nlink--; |
240 | drop_nlink(ip->i_vnode); | 240 | drop_nlink(VFS_I(ip)); |
241 | xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); | 241 | xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); |
242 | 242 | ||
243 | error = 0; | 243 | error = 0; |
@@ -301,7 +301,7 @@ xfs_bumplink( | |||
301 | 301 | ||
302 | ASSERT(ip->i_d.di_nlink > 0); | 302 | ASSERT(ip->i_d.di_nlink > 0); |
303 | ip->i_d.di_nlink++; | 303 | ip->i_d.di_nlink++; |
304 | inc_nlink(ip->i_vnode); | 304 | inc_nlink(VFS_I(ip)); |
305 | if ((ip->i_d.di_version == XFS_DINODE_VERSION_1) && | 305 | if ((ip->i_d.di_version == XFS_DINODE_VERSION_1) && |
306 | (ip->i_d.di_nlink > XFS_MAXLINK_1)) { | 306 | (ip->i_d.di_nlink > XFS_MAXLINK_1)) { |
307 | /* | 307 | /* |