diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index f8b5a37134f8..e5a90a0b8f8a 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c @@ -2592,8 +2592,10 @@ xfs_ifree_cluster( mp->m_bsize * igeo->blocks_per_cluster, XBF_UNMAPPED); - if (!bp) + if (!bp) { + xfs_perag_put(pag); return -ENOMEM; + } /* * This buffer may not have been correctly initialised as we