summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_inode.c
diff options
context:
space:
mode:
authorChuhong Yuan <hslester96@gmail.com>2020-06-03 18:27:28 +0200
committerDarrick J. Wong <darrick.wong@oracle.com>2020-06-09 05:57:03 +0200
commit8cc0072469723459dc6bd7beff81b2b3149f4cf4 (patch)
tree53e5e11aea20a9cfbead9ed7a0a5a589e310bf73 /fs/xfs/xfs_inode.c
parentxfs: more lockdep whackamole with kmem_alloc* (diff)
downloadlinux-8cc0072469723459dc6bd7beff81b2b3149f4cf4.tar.xz
linux-8cc0072469723459dc6bd7beff81b2b3149f4cf4.zip
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: ce92464c180b ("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>
Diffstat (limited to 'fs/xfs/xfs_inode.c')
-rw-r--r--fs/xfs/xfs_inode.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index 64f5f9a440ae..88a9e4964802 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -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