aboutsummaryrefslogtreecommitdiffstatshomepage
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
parentMerge tag '9p-for-5.8' of git://github.com/martinetd/linux (diff)
parentxfs: Add the missed xfs_perag_put() for xfs_ifree_cluster() (diff)
downloadwireguard-linux-c55572276834f8b17c859db7d20c224fe25b9eda.tar.xz
wireguard-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()
-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