diff options
Diffstat (limited to 'fs/xfs/xfs_inode.c')
-rw-r--r-- | fs/xfs/xfs_inode.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index bd3d81636d51..0317b000ab44 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c | |||
@@ -2695,7 +2695,7 @@ xfs_iflush_cluster( | |||
2695 | ilist_size = inodes_per_cluster * sizeof(xfs_inode_t *); | 2695 | ilist_size = inodes_per_cluster * sizeof(xfs_inode_t *); |
2696 | ilist = kmem_alloc(ilist_size, KM_MAYFAIL|KM_NOFS); | 2696 | ilist = kmem_alloc(ilist_size, KM_MAYFAIL|KM_NOFS); |
2697 | if (!ilist) | 2697 | if (!ilist) |
2698 | return 0; | 2698 | goto out_put; |
2699 | 2699 | ||
2700 | mask = ~(((XFS_INODE_CLUSTER_SIZE(mp) >> mp->m_sb.sb_inodelog)) - 1); | 2700 | mask = ~(((XFS_INODE_CLUSTER_SIZE(mp) >> mp->m_sb.sb_inodelog)) - 1); |
2701 | first_index = XFS_INO_TO_AGINO(mp, ip->i_ino) & mask; | 2701 | first_index = XFS_INO_TO_AGINO(mp, ip->i_ino) & mask; |
@@ -2764,6 +2764,8 @@ xfs_iflush_cluster( | |||
2764 | out_free: | 2764 | out_free: |
2765 | read_unlock(&pag->pag_ici_lock); | 2765 | read_unlock(&pag->pag_ici_lock); |
2766 | kmem_free(ilist); | 2766 | kmem_free(ilist); |
2767 | out_put: | ||
2768 | xfs_perag_put(pag); | ||
2767 | return 0; | 2769 | return 0; |
2768 | 2770 | ||
2769 | 2771 | ||
@@ -2807,6 +2809,7 @@ cluster_corrupt_out: | |||
2807 | */ | 2809 | */ |
2808 | xfs_iflush_abort(iq); | 2810 | xfs_iflush_abort(iq); |
2809 | kmem_free(ilist); | 2811 | kmem_free(ilist); |
2812 | xfs_perag_put(pag); | ||
2810 | return XFS_ERROR(EFSCORRUPTED); | 2813 | return XFS_ERROR(EFSCORRUPTED); |
2811 | } | 2814 | } |
2812 | 2815 | ||