Skip to content

Commit 8cc0072

Browse files
WillLesterdjwong
authored andcommitted
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: ce92464 ("xfs: make xfs_trans_get_buf return an error code") Signed-off-by: Chuhong Yuan <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Darrick J. Wong <[email protected]>
1 parent 6dcde60 commit 8cc0072

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

fs/xfs/xfs_inode.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2634,8 +2634,10 @@ xfs_ifree_cluster(
26342634
error = xfs_trans_get_buf(tp, mp->m_ddev_targp, blkno,
26352635
mp->m_bsize * igeo->blocks_per_cluster,
26362636
XBF_UNMAPPED, &bp);
2637-
if (error)
2637+
if (error) {
2638+
xfs_perag_put(pag);
26382639
return error;
2640+
}
26392641

26402642
/*
26412643
* This buffer may not have been correctly initialised as we

0 commit comments

Comments
 (0)