diff options
Diffstat (limited to 'fs/xfs/xfs_log.c')
-rw-r--r-- | fs/xfs/xfs_log.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index 18fd4beffcc3..211930246f20 100644 --- a/fs/xfs/xfs_log.c +++ b/fs/xfs/xfs_log.c | |||
@@ -1449,6 +1449,13 @@ xlog_dealloc_log(xlog_t *log) | |||
1449 | 1449 | ||
1450 | xlog_cil_destroy(log); | 1450 | xlog_cil_destroy(log); |
1451 | 1451 | ||
1452 | /* | ||
1453 | * always need to ensure that the extra buffer does not point to memory | ||
1454 | * owned by another log buffer before we free it. | ||
1455 | */ | ||
1456 | xfs_buf_set_empty(log->l_xbuf, log->l_iclog_size); | ||
1457 | xfs_buf_free(log->l_xbuf); | ||
1458 | |||
1452 | iclog = log->l_iclog; | 1459 | iclog = log->l_iclog; |
1453 | for (i=0; i<log->l_iclog_bufs; i++) { | 1460 | for (i=0; i<log->l_iclog_bufs; i++) { |
1454 | xfs_buf_free(iclog->ic_bp); | 1461 | xfs_buf_free(iclog->ic_bp); |
@@ -1458,7 +1465,6 @@ xlog_dealloc_log(xlog_t *log) | |||
1458 | } | 1465 | } |
1459 | spinlock_destroy(&log->l_icloglock); | 1466 | spinlock_destroy(&log->l_icloglock); |
1460 | 1467 | ||
1461 | xfs_buf_free(log->l_xbuf); | ||
1462 | log->l_mp->m_log = NULL; | 1468 | log->l_mp->m_log = NULL; |
1463 | kmem_free(log); | 1469 | kmem_free(log); |
1464 | } /* xlog_dealloc_log */ | 1470 | } /* xlog_dealloc_log */ |