Skip to contentSkip to conversation

swap: ifdef struct vm_area_struct::swap_readahead_info

PATCH In review Alexey Dobriyan 2 participants 2 messages May 3, 2019 – May 4, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 swap: ifdef struct vm_area_struct::swap_readahead_info

The field is only used in swap code.

---

 include/linux/mm_types.h |    2 ++
 1 file changed, 2 insertions(+)
include/linux/mm_types.h +2 -0
@@ -326,7 +326,9 @@ struct vm_area_struct {
 	struct file * vm_file;		/* File we map to (can be NULL). */
 	void * vm_private_data;		/* was vm_pte (shared mem) */
 
+#ifdef CONFIG_SWAP
 	atomic_long_t swap_readahead_info;
+#endif
 #ifndef CONFIG_MMU
 	struct vm_region *vm_region;	/* NOMMU mapping region */
 #endif
Acked-by on v1 1/1
#1 lore raw
Quoted 3 lines · Alexey Dobriyan

The field is only used in swap code.

Quoted 17 lines

---

 include/linux/mm_types.h |    2 ++
 1 file changed, 2 insertions(+)
include/linux/mm_types.h +2 -0
@@ -326,7 +326,9 @@ struct vm_area_struct {
 	struct file * vm_file;		/* File we map to (can be NULL). */
 	void * vm_private_data;		/* was vm_pte (shared mem) */
 
+#ifdef CONFIG_SWAP
 	atomic_long_t swap_readahead_info;
+#endif
 #ifndef CONFIG_MMU
 	struct vm_region *vm_region;	/* NOMMU mapping region */
 #endif
Signature · 2 lines
Michal Hocko
SUSE Labs