“5a0c7e18ebbd61763f3f0f2ef79d5f6a65e81edb”上不存在“src/share/git@gitcode.net:openanolis/dragonwell8_jdk.git”
提交 b2c20045 编写于 作者: C Christoph Hellwig 提交者: Darrick J. Wong

xfs: remove xfs_ifree_local_data

xfs_ifree only need to free inline data in the data fork, as we've
already taken care of the attr fork before (and in fact freed the
fork structure).  Just open code the freeing of the inline data.
Signed-off-by: NChristoph Hellwig <hch@lst.de>
Reviewed-by: NBrian Foster <bfoster@redhat.com>
Reviewed-by: NChandan Babu R <chandanrlinux@gmail.com>
Reviewed-by: NDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
上级 09c38edd
...@@ -2711,24 +2711,6 @@ xfs_ifree_cluster( ...@@ -2711,24 +2711,6 @@ xfs_ifree_cluster(
return 0; return 0;
} }
/*
* Free any local-format buffers sitting around before we reset to
* extents format.
*/
static inline void
xfs_ifree_local_data(
struct xfs_inode *ip,
int whichfork)
{
struct xfs_ifork *ifp;
if (XFS_IFORK_FORMAT(ip, whichfork) != XFS_DINODE_FMT_LOCAL)
return;
ifp = XFS_IFORK_PTR(ip, whichfork);
xfs_idata_realloc(ip, -ifp->if_bytes, whichfork);
}
/* /*
* This is called to return an inode to the inode free list. * This is called to return an inode to the inode free list.
* The inode should already be truncated to 0 length and have * The inode should already be truncated to 0 length and have
...@@ -2765,8 +2747,16 @@ xfs_ifree( ...@@ -2765,8 +2747,16 @@ xfs_ifree(
if (error) if (error)
return error; return error;
xfs_ifree_local_data(ip, XFS_DATA_FORK); /*
xfs_ifree_local_data(ip, XFS_ATTR_FORK); * Free any local-format data sitting around before we reset the
* data fork to extents format. Note that the attr fork data has
* already been freed by xfs_attr_inactive.
*/
if (ip->i_d.di_format == XFS_DINODE_FMT_LOCAL) {
kmem_free(ip->i_df.if_u1.if_data);
ip->i_df.if_u1.if_data = NULL;
ip->i_df.if_bytes = 0;
}
VFS_I(ip)->i_mode = 0; /* mark incore inode as free */ VFS_I(ip)->i_mode = 0; /* mark incore inode as free */
ip->i_d.di_flags = 0; ip->i_d.di_flags = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册