mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
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: ce92464c18
("xfs: make xfs_trans_get_buf return an error code")
Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
This commit is contained in:
parent
6dcde60efd
commit
8cc0072469
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue