diff options
Diffstat (limited to 'fs/xfs/xfs_log_recover.c')
-rw-r--r-- | fs/xfs/xfs_log_recover.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index e65ab4af0955..9eb722ec744e 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c | |||
@@ -1715,8 +1715,7 @@ xlog_check_buffer_cancelled( | |||
1715 | } else { | 1715 | } else { |
1716 | prevp->bc_next = bcp->bc_next; | 1716 | prevp->bc_next = bcp->bc_next; |
1717 | } | 1717 | } |
1718 | kmem_free(bcp, | 1718 | kmem_free(bcp); |
1719 | sizeof(xfs_buf_cancel_t)); | ||
1720 | } | 1719 | } |
1721 | } | 1720 | } |
1722 | return 1; | 1721 | return 1; |
@@ -2519,7 +2518,7 @@ write_inode_buffer: | |||
2519 | 2518 | ||
2520 | error: | 2519 | error: |
2521 | if (need_free) | 2520 | if (need_free) |
2522 | kmem_free(in_f, sizeof(*in_f)); | 2521 | kmem_free(in_f); |
2523 | return XFS_ERROR(error); | 2522 | return XFS_ERROR(error); |
2524 | } | 2523 | } |
2525 | 2524 | ||
@@ -2830,16 +2829,14 @@ xlog_recover_free_trans( | |||
2830 | item = item->ri_next; | 2829 | item = item->ri_next; |
2831 | /* Free the regions in the item. */ | 2830 | /* Free the regions in the item. */ |
2832 | for (i = 0; i < free_item->ri_cnt; i++) { | 2831 | for (i = 0; i < free_item->ri_cnt; i++) { |
2833 | kmem_free(free_item->ri_buf[i].i_addr, | 2832 | kmem_free(free_item->ri_buf[i].i_addr); |
2834 | free_item->ri_buf[i].i_len); | ||
2835 | } | 2833 | } |
2836 | /* Free the item itself */ | 2834 | /* Free the item itself */ |
2837 | kmem_free(free_item->ri_buf, | 2835 | kmem_free(free_item->ri_buf); |
2838 | (free_item->ri_total * sizeof(xfs_log_iovec_t))); | 2836 | kmem_free(free_item); |
2839 | kmem_free(free_item, sizeof(xlog_recover_item_t)); | ||
2840 | } while (first_item != item); | 2837 | } while (first_item != item); |
2841 | /* Free the transaction recover structure */ | 2838 | /* Free the transaction recover structure */ |
2842 | kmem_free(trans, sizeof(xlog_recover_t)); | 2839 | kmem_free(trans); |
2843 | } | 2840 | } |
2844 | 2841 | ||
2845 | STATIC int | 2842 | STATIC int |
@@ -3786,8 +3783,7 @@ xlog_do_log_recovery( | |||
3786 | error = xlog_do_recovery_pass(log, head_blk, tail_blk, | 3783 | error = xlog_do_recovery_pass(log, head_blk, tail_blk, |
3787 | XLOG_RECOVER_PASS1); | 3784 | XLOG_RECOVER_PASS1); |
3788 | if (error != 0) { | 3785 | if (error != 0) { |
3789 | kmem_free(log->l_buf_cancel_table, | 3786 | kmem_free(log->l_buf_cancel_table); |
3790 | XLOG_BC_TABLE_SIZE * sizeof(xfs_buf_cancel_t*)); | ||
3791 | log->l_buf_cancel_table = NULL; | 3787 | log->l_buf_cancel_table = NULL; |
3792 | return error; | 3788 | return error; |
3793 | } | 3789 | } |
@@ -3806,8 +3802,7 @@ xlog_do_log_recovery( | |||
3806 | } | 3802 | } |
3807 | #endif /* DEBUG */ | 3803 | #endif /* DEBUG */ |
3808 | 3804 | ||
3809 | kmem_free(log->l_buf_cancel_table, | 3805 | kmem_free(log->l_buf_cancel_table); |
3810 | XLOG_BC_TABLE_SIZE * sizeof(xfs_buf_cancel_t*)); | ||
3811 | log->l_buf_cancel_table = NULL; | 3806 | log->l_buf_cancel_table = NULL; |
3812 | 3807 | ||
3813 | return error; | 3808 | return error; |