summaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2020-06-13 12:40:24 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2020-06-13 12:40:24 -0700
commitc55572276834f8b17c859db7d20c224fe25b9eda (patch)
tree91644a9b3d64a7b1d3b0dfa60f808b14e164d8c3 /fs/xfs
parent61f3e825bec7364790cb7d193a9a156c46119cff (diff)
parent8cc0072469723459dc6bd7beff81b2b3149f4cf4 (diff)
downloadlinux-c55572276834f8b17c859db7d20c224fe25b9eda.tar.gz
linux-c55572276834f8b17c859db7d20c224fe25b9eda.tar.bz2
linux-c55572276834f8b17c859db7d20c224fe25b9eda.zip
Merge tag 'xfs-5.8-merge-9' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
Pull xfs fix from Darrick Wong: "We've settled down into the bugfix phase; this one fixes a resource leak on an error bailout path" * tag 'xfs-5.8-merge-9' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: Add the missed xfs_perag_put() for xfs_ifree_cluster()
Diffstat (limited to 'fs/xfs')
-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 4c91fb25ec66..9aea7d68d8ab 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