xfs: move the di_nblocks field to struct xfs_inode
[sfrench/cifs-2.6.git] / fs / xfs / xfs_bmap_util.c
index e7d68318e6a55c6c1bdfaf47db088da061996889..ce1a32df01210ea3519db4bfcbaa5c4c127476cd 100644 (file)
@@ -154,7 +154,7 @@ xfs_bmap_rtalloc(
                ap->blkno *= mp->m_sb.sb_rextsize;
                ralen *= mp->m_sb.sb_rextsize;
                ap->length = ralen;
-               ap->ip->i_d.di_nblocks += ralen;
+               ap->ip->i_nblocks += ralen;
                xfs_trans_log_inode(ap->tp, ap->ip, XFS_ILOG_CORE);
                if (ap->wasdel)
                        ap->ip->i_delayed_blks -= ralen;
@@ -423,7 +423,7 @@ xfs_getbmap(
                break;
        case XFS_DATA_FORK:
                if (!(iflags & BMV_IF_DELALLOC) &&
-                   (ip->i_delayed_blks || XFS_ISIZE(ip) > ip->i_d.di_size)) {
+                   (ip->i_delayed_blks || XFS_ISIZE(ip) > ip->i_disk_size)) {
                        error = filemap_write_and_wait(VFS_I(ip)->i_mapping);
                        if (error)
                                goto out_unlock_iolock;
@@ -1208,7 +1208,7 @@ xfs_swap_extents_check_format(
        if (XFS_IS_QUOTA_ON(ip->i_mount) &&
            (!uid_eq(VFS_I(ip)->i_uid, VFS_I(tip)->i_uid) ||
             !gid_eq(VFS_I(ip)->i_gid, VFS_I(tip)->i_gid) ||
-            ip->i_d.di_projid != tip->i_d.di_projid))
+            ip->i_projid != tip->i_projid))
                return -EINVAL;
 
        /* Should never get a local format */
@@ -1476,9 +1476,9 @@ xfs_swap_extent_forks(
        /*
         * Fix the on-disk inode values
         */
-       tmp = (uint64_t)ip->i_d.di_nblocks;
-       ip->i_d.di_nblocks = tip->i_d.di_nblocks - taforkblks + aforkblks;
-       tip->i_d.di_nblocks = tmp + taforkblks - aforkblks;
+       tmp = (uint64_t)ip->i_nblocks;
+       ip->i_nblocks = tip->i_nblocks - taforkblks + aforkblks;
+       tip->i_nblocks = tmp + taforkblks - aforkblks;
 
        /*
         * The extents in the source inode could still contain speculative
@@ -1663,8 +1663,8 @@ xfs_swap_extents(
 
        /* Verify all data are being swapped */
        if (sxp->sx_offset != 0 ||
-           sxp->sx_length != ip->i_d.di_size ||
-           sxp->sx_length != tip->i_d.di_size) {
+           sxp->sx_length != ip->i_disk_size ||
+           sxp->sx_length != tip->i_disk_size) {
                error = -EFAULT;
                goto out_trans_cancel;
        }