summaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_dir2_block.c
diff options
context:
space:
mode:
authorBrian Foster <bfoster@redhat.com>2019-10-07 12:54:16 -0700
committerDarrick J. Wong <darrick.wong@oracle.com>2019-10-09 08:54:30 -0700
commitaeea4b75f045294e1c026acc380466daa43afc65 (patch)
treecb1ea331f4b4d12b4467f8518d774ddb260ecb00 /fs/xfs/libxfs/xfs_dir2_block.c
parent603efebd6768356fb7cea02e4a822587c2dc5d7c (diff)
downloadlinux-aeea4b75f045294e1c026acc380466daa43afc65.tar.gz
linux-aeea4b75f045294e1c026acc380466daa43afc65.tar.bz2
linux-aeea4b75f045294e1c026acc380466daa43afc65.zip
xfs: move local to extent inode logging into bmap helper
The callers of xfs_bmap_local_to_extents_empty() log the inode external to the function, yet this function is where the on-disk format value is updated. Push the inode logging down into the function itself to help prevent future mistakes. Note that internal bmap callers track the inode logging flags independently and thus may log the inode core twice due to this change. This is harmless, so leave this code around for consistency with the other attr fork conversion functions. Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_dir2_block.c')
-rw-r--r--fs/xfs/libxfs/xfs_dir2_block.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/xfs/libxfs/xfs_dir2_block.c b/fs/xfs/libxfs/xfs_dir2_block.c
index 3d1e5f6d64fd..49e4bc39e7bb 100644
--- a/fs/xfs/libxfs/xfs_dir2_block.c
+++ b/fs/xfs/libxfs/xfs_dir2_block.c
@@ -1096,9 +1096,8 @@ xfs_dir2_sf_to_block(
memcpy(sfp, oldsfp, ifp->if_bytes);
xfs_idata_realloc(dp, -ifp->if_bytes, XFS_DATA_FORK);
- xfs_bmap_local_to_extents_empty(dp, XFS_DATA_FORK);
+ xfs_bmap_local_to_extents_empty(tp, dp, XFS_DATA_FORK);
dp->i_d.di_size = 0;
- xfs_trans_log_inode(tp, dp, XFS_ILOG_CORE);
/*
* Add block 0 to the inode.