diff options
author | Will Deacon <will@kernel.org> | 2021-01-14 18:42:14 +0300 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2021-01-21 15:50:18 +0300 |
commit | 8c63ca5bc3e19f11128e8e285dcf20aac6768f97 (patch) | |
tree | 49a45f35182ff79bca8132b5e8c432b5b703ac00 /mm/shmem.c | |
parent | 2b635dd372f6c8f27644c662bb48d10376ce561a (diff) | |
download | linux-8c63ca5bc3e19f11128e8e285dcf20aac6768f97.tar.xz |
mm: Use static initialisers for immutable fields of 'struct vm_fault'
In preparation for const-ifying the anonymous struct field of
'struct vm_fault', ensure that it is initialised using designated
initialisers.
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'mm/shmem.c')
-rw-r--r-- | mm/shmem.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/shmem.c b/mm/shmem.c index 7c6b6d8f6c39..1b254fbfdf52 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -1520,11 +1520,11 @@ static struct page *shmem_swapin(swp_entry_t swap, gfp_t gfp, { struct vm_area_struct pvma; struct page *page; - struct vm_fault vmf; + struct vm_fault vmf = { + .vma = &pvma, + }; shmem_pseudo_vma_init(&pvma, info, index); - vmf.vma = &pvma; - vmf.address = 0; page = swap_cluster_readahead(swap, gfp, &vmf); shmem_pseudo_vma_destroy(&pvma); |