summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_symlink.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
commit13d2c10b05d8e67cb9b4c2d1d4a09a906148a72e (patch)
tree582381231aeb2c1f8933cce50408dd2c676bf609 /fs/xfs/xfs_symlink.c
parentceaf603c7024d3c021803a3e90e893feda8d76e2 (diff)
xfs: move the di_size field to struct xfs_inode
In preparation of removing the historic icinode struct, move the on-disk size 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/xfs_symlink.c')
-rw-r--r--fs/xfs/xfs_symlink.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/fs/xfs/xfs_symlink.c b/fs/xfs/xfs_symlink.c
index db9c400f9258..194f52b3abb1 100644
--- a/fs/xfs/xfs_symlink.c
+++ b/fs/xfs/xfs_symlink.c
@@ -33,7 +33,7 @@ xfs_readlink_bmap_ilocked(
struct xfs_buf *bp;
xfs_daddr_t d;
char *cur_chunk;
- int pathlen = ip->i_d.di_size;
+ int pathlen = ip->i_disk_size;
int nmaps = XFS_SYMLINK_MAPS;
int byte_cnt;
int n;
@@ -86,7 +86,7 @@ xfs_readlink_bmap_ilocked(
}
ASSERT(pathlen == 0);
- link[ip->i_d.di_size] = '\0';
+ link[ip->i_disk_size] = '\0';
error = 0;
out:
@@ -111,7 +111,7 @@ xfs_readlink(
xfs_ilock(ip, XFS_ILOCK_SHARED);
- pathlen = ip->i_d.di_size;
+ pathlen = ip->i_disk_size;
if (!pathlen)
goto out;
@@ -250,7 +250,7 @@ xfs_symlink(
if (pathlen <= XFS_IFORK_DSIZE(ip)) {
xfs_init_local_fork(ip, XFS_DATA_FORK, target_path, pathlen);
- ip->i_d.di_size = pathlen;
+ ip->i_disk_size = pathlen;
ip->i_df.if_format = XFS_DINODE_FMT_LOCAL;
xfs_trans_log_inode(tp, ip, XFS_ILOG_DDATA | XFS_ILOG_CORE);
} else {
@@ -265,7 +265,7 @@ xfs_symlink(
goto out_trans_cancel;
resblks -= fs_blocks;
- ip->i_d.di_size = pathlen;
+ ip->i_disk_size = pathlen;
xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
cur_chunk = target_path;
@@ -300,7 +300,7 @@ xfs_symlink(
}
ASSERT(pathlen == 0);
}
- i_size_write(VFS_I(ip), ip->i_d.di_size);
+ i_size_write(VFS_I(ip), ip->i_disk_size);
/*
* Create the directory entry for the symlink.
@@ -400,8 +400,8 @@ xfs_inactive_symlink_rmt(
* locked for the second transaction. In the error paths we need it
* held so the cancel won't rele it, see below.
*/
- size = (int)ip->i_d.di_size;
- ip->i_d.di_size = 0;
+ size = (int)ip->i_disk_size;
+ ip->i_disk_size = 0;
VFS_I(ip)->i_mode = (VFS_I(ip)->i_mode & ~S_IFMT) | S_IFREG;
xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
/*
@@ -477,7 +477,7 @@ xfs_inactive_symlink(
return -EIO;
xfs_ilock(ip, XFS_ILOCK_EXCL);
- pathlen = (int)ip->i_d.di_size;
+ pathlen = (int)ip->i_disk_size;
ASSERT(pathlen);
if (pathlen <= 0 || pathlen > XFS_SYMLINK_MAXLEN) {