summaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs/xfs_inode_buf.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-03-29 11:11:40 -0700
committerDarrick J. Wong <djwong@kernel.org>2021-04-07 14:37:03 -0700
commit6e73a545f91e128d8dd7da1769dca200225f5d82 (patch)
tree906751d5c19e819b264ee0fa00eda26a8de6a89e /fs/xfs/libxfs/xfs_inode_buf.c
parent13d2c10b05d8e67cb9b4c2d1d4a09a906148a72e (diff)
xfs: move the di_nblocks field to struct xfs_inode
In preparation of removing the historic icinode struct, move the nblocks field into the containing xfs_inode structure. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/libxfs/xfs_inode_buf.c')
-rw-r--r--fs/xfs/libxfs/xfs_inode_buf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/libxfs/xfs_inode_buf.c b/fs/xfs/libxfs/xfs_inode_buf.c
index 928c884c627b..e699669039c3 100644
--- a/fs/xfs/libxfs/xfs_inode_buf.c
+++ b/fs/xfs/libxfs/xfs_inode_buf.c
@@ -227,7 +227,7 @@ xfs_inode_from_disk(
inode->i_ctime = xfs_inode_from_disk_ts(from, from->di_ctime);
ip->i_disk_size = be64_to_cpu(from->di_size);
- to->di_nblocks = be64_to_cpu(from->di_nblocks);
+ ip->i_nblocks = be64_to_cpu(from->di_nblocks);
to->di_extsize = be32_to_cpu(from->di_extsize);
to->di_forkoff = from->di_forkoff;
to->di_flags = be16_to_cpu(from->di_flags);
@@ -306,7 +306,7 @@ xfs_inode_to_disk(
to->di_mode = cpu_to_be16(inode->i_mode);
to->di_size = cpu_to_be64(ip->i_disk_size);
- to->di_nblocks = cpu_to_be64(from->di_nblocks);
+ to->di_nblocks = cpu_to_be64(ip->i_nblocks);
to->di_extsize = cpu_to_be32(from->di_extsize);
to->di_nextents = cpu_to_be32(xfs_ifork_nextents(&ip->i_df));
to->di_anextents = cpu_to_be16(xfs_ifork_nextents(ip->i_afp));