aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_inode.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2008-11-27 22:23:39 -0500
committerNiv Sardi <xaiki@sgi.com>2008-11-30 19:37:42 -0500
commit51ce16d519da0bc3c548e0facef7cb3aab1ac8cc (patch)
treeef01910a32368377514f0d61022b1d9b1de7c41d /fs/xfs/xfs_inode.c
parent81591fe2db19d0fc1ec2aaaa6a790a5ab97ac3ab (diff)
[XFS] kill XFS_DINODE_VERSION_ defines
These names don't add any value at all over just using the numerical values. (First sent on October 9th) Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <david@fromorbit.com> Signed-off-by: Niv Sardi <xaiki@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_inode.c')
-rw-r--r--fs/xfs/xfs_inode.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index 1d2912dc5226..083395cd675b 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -965,7 +965,7 @@ xfs_iread(
965 * the new format. We don't change the version number so that we 965 * the new format. We don't change the version number so that we
966 * can distinguish this from a real new format inode. 966 * can distinguish this from a real new format inode.
967 */ 967 */
968 if (ip->i_d.di_version == XFS_DINODE_VERSION_1) { 968 if (ip->i_d.di_version == 1) {
969 ip->i_d.di_nlink = ip->i_d.di_onlink; 969 ip->i_d.di_nlink = ip->i_d.di_onlink;
970 ip->i_d.di_onlink = 0; 970 ip->i_d.di_onlink = 0;
971 ip->i_d.di_projid = 0; 971 ip->i_d.di_projid = 0;
@@ -1139,8 +1139,8 @@ xfs_ialloc(
1139 * here rather than here and in the flush/logging code. 1139 * here rather than here and in the flush/logging code.
1140 */ 1140 */
1141 if (xfs_sb_version_hasnlink(&tp->t_mountp->m_sb) && 1141 if (xfs_sb_version_hasnlink(&tp->t_mountp->m_sb) &&
1142 ip->i_d.di_version == XFS_DINODE_VERSION_1) { 1142 ip->i_d.di_version == 1) {
1143 ip->i_d.di_version = XFS_DINODE_VERSION_2; 1143 ip->i_d.di_version = 2;
1144 /* 1144 /*
1145 * We've already zeroed the old link count, the projid field, 1145 * We've already zeroed the old link count, the projid field,
1146 * and the pad field. 1146 * and the pad field.
@@ -1150,7 +1150,7 @@ xfs_ialloc(
1150 /* 1150 /*
1151 * Project ids won't be stored on disk if we are using a version 1 inode. 1151 * Project ids won't be stored on disk if we are using a version 1 inode.
1152 */ 1152 */
1153 if ((prid != 0) && (ip->i_d.di_version == XFS_DINODE_VERSION_1)) 1153 if ((prid != 0) && (ip->i_d.di_version == 1))
1154 xfs_bump_ino_vers2(tp, ip); 1154 xfs_bump_ino_vers2(tp, ip);
1155 1155
1156 if (pip && XFS_INHERIT_GID(pip)) { 1156 if (pip && XFS_INHERIT_GID(pip)) {
@@ -3373,9 +3373,8 @@ xfs_iflush_int(
3373 * convert back to the old inode format. If the superblock version 3373 * convert back to the old inode format. If the superblock version
3374 * has been updated, then make the conversion permanent. 3374 * has been updated, then make the conversion permanent.
3375 */ 3375 */
3376 ASSERT(ip->i_d.di_version == XFS_DINODE_VERSION_1 || 3376 ASSERT(ip->i_d.di_version == 1 || xfs_sb_version_hasnlink(&mp->m_sb));
3377 xfs_sb_version_hasnlink(&mp->m_sb)); 3377 if (ip->i_d.di_version == 1) {
3378 if (ip->i_d.di_version == XFS_DINODE_VERSION_1) {
3379 if (!xfs_sb_version_hasnlink(&mp->m_sb)) { 3378 if (!xfs_sb_version_hasnlink(&mp->m_sb)) {
3380 /* 3379 /*
3381 * Convert it back. 3380 * Convert it back.
@@ -3388,8 +3387,8 @@ xfs_iflush_int(
3388 * so just make the conversion to the new inode 3387 * so just make the conversion to the new inode
3389 * format permanent. 3388 * format permanent.
3390 */ 3389 */
3391 ip->i_d.di_version = XFS_DINODE_VERSION_2; 3390 ip->i_d.di_version = 2;
3392 dip->di_version = XFS_DINODE_VERSION_2; 3391 dip->di_version = 2;
3393 ip->i_d.di_onlink = 0; 3392 ip->i_d.di_onlink = 0;
3394 dip->di_onlink = 0; 3393 dip->di_onlink = 0;
3395 memset(&(ip->i_d.di_pad[0]), 0, sizeof(ip->i_d.di_pad)); 3394 memset(&(ip->i_d.di_pad[0]), 0, sizeof(ip->i_d.di_pad));