]> git.karo-electronics.de Git - linux-beck.git/blobdiff - fs/xfs/xfs_buf.c
list_lru: introduce list_lru_shrink_{count,walk}
[linux-beck.git] / fs / xfs / xfs_buf.c
index bb502a391792100f011c372009d52df4e9f88375..15c9d224c72136cda0e776801ff29f50d9ae7db7 100644 (file)
@@ -1583,10 +1583,9 @@ xfs_buftarg_shrink_scan(
                                        struct xfs_buftarg, bt_shrinker);
        LIST_HEAD(dispose);
        unsigned long           freed;
-       unsigned long           nr_to_scan = sc->nr_to_scan;
 
-       freed = list_lru_walk_node(&btp->bt_lru, sc->nid, xfs_buftarg_isolate,
-                                      &dispose, &nr_to_scan);
+       freed = list_lru_shrink_walk(&btp->bt_lru, sc,
+                                    xfs_buftarg_isolate, &dispose);
 
        while (!list_empty(&dispose)) {
                struct xfs_buf *bp;
@@ -1605,7 +1604,7 @@ xfs_buftarg_shrink_count(
 {
        struct xfs_buftarg      *btp = container_of(shrink,
                                        struct xfs_buftarg, bt_shrinker);
-       return list_lru_count_node(&btp->bt_lru, sc->nid);
+       return list_lru_shrink_count(&btp->bt_lru, sc);
 }
 
 void