diff options
Diffstat (limited to 'fs/xfs/xfs_buf.c')
-rw-r--r-- | fs/xfs/xfs_buf.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c index d46f6a3dc1de..49fdb7bed481 100644 --- a/fs/xfs/xfs_buf.c +++ b/fs/xfs/xfs_buf.c | |||
@@ -1592,6 +1592,7 @@ xfs_free_buftarg( | |||
1592 | struct xfs_mount *mp, | 1592 | struct xfs_mount *mp, |
1593 | struct xfs_buftarg *btp) | 1593 | struct xfs_buftarg *btp) |
1594 | { | 1594 | { |
1595 | list_lru_destroy(&btp->bt_lru); | ||
1595 | unregister_shrinker(&btp->bt_shrinker); | 1596 | unregister_shrinker(&btp->bt_shrinker); |
1596 | 1597 | ||
1597 | if (mp->m_flags & XFS_MOUNT_BARRIER) | 1598 | if (mp->m_flags & XFS_MOUNT_BARRIER) |
@@ -1666,9 +1667,12 @@ xfs_alloc_buftarg( | |||
1666 | if (!btp->bt_bdi) | 1667 | if (!btp->bt_bdi) |
1667 | goto error; | 1668 | goto error; |
1668 | 1669 | ||
1669 | list_lru_init(&btp->bt_lru); | ||
1670 | if (xfs_setsize_buftarg_early(btp, bdev)) | 1670 | if (xfs_setsize_buftarg_early(btp, bdev)) |
1671 | goto error; | 1671 | goto error; |
1672 | |||
1673 | if (list_lru_init(&btp->bt_lru)) | ||
1674 | goto error; | ||
1675 | |||
1672 | btp->bt_shrinker.count_objects = xfs_buftarg_shrink_count; | 1676 | btp->bt_shrinker.count_objects = xfs_buftarg_shrink_count; |
1673 | btp->bt_shrinker.scan_objects = xfs_buftarg_shrink_scan; | 1677 | btp->bt_shrinker.scan_objects = xfs_buftarg_shrink_scan; |
1674 | btp->bt_shrinker.seeks = DEFAULT_SEEKS; | 1678 | btp->bt_shrinker.seeks = DEFAULT_SEEKS; |