summaryrefslogtreecommitdiffstats
path: root/mm/zbud.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/zbud.c')
-rw-r--r--mm/zbud.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/mm/zbud.c b/mm/zbud.c
index 7ec5f27a68b0..c48e60bae4a1 100644
--- a/mm/zbud.c
+++ b/mm/zbud.c
@@ -93,8 +93,14 @@
*/
struct zbud_pool {
spinlock_t lock;
- struct list_head unbuddied[NCHUNKS];
- struct list_head buddied;
+ union {
+ /*
+ * Reuse unbuddied[0] as buddied on the ground that
+ * unbuddied[0] is unused.
+ */
+ struct list_head buddied;
+ struct list_head unbuddied[NCHUNKS];
+ };
struct list_head lru;
u64 pages_nr;
const struct zbud_ops *ops;