aboutsummaryrefslogtreecommitdiff
path: root/include/linux/shrinker.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/shrinker.h')
-rw-r--r--include/linux/shrinker.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/shrinker.h b/include/linux/shrinker.h
index 790651b4e5b..07ceb97d53f 100644
--- a/include/linux/shrinker.h
+++ b/include/linux/shrinker.h
@@ -20,6 +20,7 @@ struct shrink_control {
* 'nr_to_scan' entries and attempt to free them up. It should return
* the number of objects which remain in the cache. If it returns -1, it means
* it cannot do any scanning at this time (eg. there is a risk of deadlock).
+ * The callback must not return -1 if nr_to_scan is zero.
*
* The 'gfpmask' refers to the allocation we are currently trying to
* fulfil.
@@ -34,7 +35,7 @@ struct shrinker {
/* These are for internal use */
struct list_head list;
- long nr; /* objs pending delete */
+ atomic_long_t nr_in_batch; /* objs pending delete */
};
#define DEFAULT_SEEKS 2 /* A good number if you don't know better. */
extern void register_shrinker(struct shrinker *);