diff mbox series

swap: ifdef struct vm_area_struct::swap_readahead_info

Message ID 20190503190500.GA30589@avx2 (mailing list archive)
State New, archived
Headers show
Series swap: ifdef struct vm_area_struct::swap_readahead_info | expand

Commit Message

Alexey Dobriyan May 3, 2019, 7:05 p.m. UTC
The field is only used in swap code.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 include/linux/mm_types.h |    2 ++
 1 file changed, 2 insertions(+)

Comments

Michal Hocko May 4, 2019, 11:33 p.m. UTC | #1
On Fri 03-05-19 22:05:00, Alexey Dobriyan wrote:
> The field is only used in swap code.
> 
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>

Acked-by: Michal Hocko <mhocko@suse.com>

> ---
> 
>  include/linux/mm_types.h |    2 ++
>  1 file changed, 2 insertions(+)
> 
> --- a/include/linux/mm_types.h
> +++ b/include/linux/mm_types.h
> @@ -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
diff mbox series

Patch

--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -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