aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_buf.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_buf.c')
-rw-r--r--fs/xfs/xfs_buf.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
index bb502a391792..1790b00bea7a 100644
--- a/fs/xfs/xfs_buf.c
+++ b/fs/xfs/xfs_buf.c
@@ -1488,6 +1488,7 @@ xfs_buf_iomove(
1488static enum lru_status 1488static enum lru_status
1489xfs_buftarg_wait_rele( 1489xfs_buftarg_wait_rele(
1490 struct list_head *item, 1490 struct list_head *item,
1491 struct list_lru_one *lru,
1491 spinlock_t *lru_lock, 1492 spinlock_t *lru_lock,
1492 void *arg) 1493 void *arg)
1493 1494
@@ -1509,7 +1510,7 @@ xfs_buftarg_wait_rele(
1509 */ 1510 */
1510 atomic_set(&bp->b_lru_ref, 0); 1511 atomic_set(&bp->b_lru_ref, 0);
1511 bp->b_state |= XFS_BSTATE_DISPOSE; 1512 bp->b_state |= XFS_BSTATE_DISPOSE;
1512 list_move(item, dispose); 1513 list_lru_isolate_move(lru, item, dispose);
1513 spin_unlock(&bp->b_lock); 1514 spin_unlock(&bp->b_lock);
1514 return LRU_REMOVED; 1515 return LRU_REMOVED;
1515} 1516}
@@ -1546,6 +1547,7 @@ xfs_wait_buftarg(
1546static enum lru_status 1547static enum lru_status
1547xfs_buftarg_isolate( 1548xfs_buftarg_isolate(
1548 struct list_head *item, 1549 struct list_head *item,
1550 struct list_lru_one *lru,
1549 spinlock_t *lru_lock, 1551 spinlock_t *lru_lock,
1550 void *arg) 1552 void *arg)
1551{ 1553{
@@ -1569,7 +1571,7 @@ xfs_buftarg_isolate(
1569 } 1571 }
1570 1572
1571 bp->b_state |= XFS_BSTATE_DISPOSE; 1573 bp->b_state |= XFS_BSTATE_DISPOSE;
1572 list_move(item, dispose); 1574 list_lru_isolate_move(lru, item, dispose);
1573 spin_unlock(&bp->b_lock); 1575 spin_unlock(&bp->b_lock);
1574 return LRU_REMOVED; 1576 return LRU_REMOVED;
1575} 1577}
@@ -1583,10 +1585,9 @@ xfs_buftarg_shrink_scan(
1583 struct xfs_buftarg, bt_shrinker); 1585 struct xfs_buftarg, bt_shrinker);
1584 LIST_HEAD(dispose); 1586 LIST_HEAD(dispose);
1585 unsigned long freed; 1587 unsigned long freed;
1586 unsigned long nr_to_scan = sc->nr_to_scan;
1587 1588
1588 freed = list_lru_walk_node(&btp->bt_lru, sc->nid, xfs_buftarg_isolate, 1589 freed = list_lru_shrink_walk(&btp->bt_lru, sc,
1589 &dispose, &nr_to_scan); 1590 xfs_buftarg_isolate, &dispose);
1590 1591
1591 while (!list_empty(&dispose)) { 1592 while (!list_empty(&dispose)) {
1592 struct xfs_buf *bp; 1593 struct xfs_buf *bp;
@@ -1605,7 +1606,7 @@ xfs_buftarg_shrink_count(
1605{ 1606{
1606 struct xfs_buftarg *btp = container_of(shrink, 1607 struct xfs_buftarg *btp = container_of(shrink,
1607 struct xfs_buftarg, bt_shrinker); 1608 struct xfs_buftarg, bt_shrinker);
1608 return list_lru_count_node(&btp->bt_lru, sc->nid); 1609 return list_lru_shrink_count(&btp->bt_lru, sc);
1609} 1610}
1610 1611
1611void 1612void