提交 8cc00724 编写于 作者: C Chuhong Yuan 提交者: Darrick J. Wong

xfs: Add the missed xfs_perag_put() for xfs_ifree_cluster()

xfs_ifree_cluster() calls xfs_perag_get() at the beginning, but forgets to
call xfs_perag_put() in one failed path.
Add the missed function call to fix it.

Fixes: ce92464c ("xfs: make xfs_trans_get_buf return an error code")
Signed-off-by: NChuhong Yuan <hslester96@gmail.com>
Reviewed-by: NDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
上级 6dcde60e
......@@ -2634,8 +2634,10 @@ xfs_ifree_cluster(
error = xfs_trans_get_buf(tp, mp->m_ddev_targp, blkno,
mp->m_bsize * igeo->blocks_per_cluster,
XBF_UNMAPPED, &bp);
if (error)
if (error) {
xfs_perag_put(pag);
return error;
}
/*
* This buffer may not have been correctly initialised as we
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册