Skip to content

Commit

Permalink
mm: shrinkers: add missing includes for undeclared types
Browse files Browse the repository at this point in the history
The shrinker.h header depends on a user including other headers before it
for types used by shrinker.h.  Fix this by including the appropriate
headers in shrinker.h.

./include/linux/shrinker.h:13:9: error: unknown type name `gfp_t'
   13 |         gfp_t gfp_mask;
      |         ^~~~~
./include/linux/shrinker.h:71:26: error: field `list' has incomplete type
   71 |         struct list_head list;
      |                          ^~~~
./include/linux/shrinker.h:82:9: error: unknown type name `atomic_long_t'
   82 |         atomic_long_t *nr_deferred;
      |

Link: https://lkml.kernel.org/r/20221114235949.201749-1-tjmercier@google.com
Fixes: 83aeead ("vmscan: use atomic-long for shrinker batching")
Fixes: b0d40c9 ("superblock: introduce per-sb cache shrinker infrastructure")
Signed-off-by: T.J. Mercier <tjmercier@google.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Dave Chinner <dchinner@redhat.com>
Cc: Konstantin Khlebnikov <khlebnikov@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
  • Loading branch information
T.J. Mercier authored and Andrew Morton committed Nov 30, 2022
1 parent 369258c commit b7217a0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/linux/shrinker.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
#ifndef _LINUX_SHRINKER_H
#define _LINUX_SHRINKER_H

#include <linux/atomic.h>
#include <linux/types.h>

/*
* This struct is used to pass information from page reclaim to the shrinkers.
* We consolidate the values for easier extension later.
Expand Down

0 comments on commit b7217a0

Please sign in to comment.