aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/mmap_lock.h
diff options
context:
space:
mode:
authorLorenzo Stoakes <lstoakes@gmail.com>2023-03-22 20:19:00 +0000
committerAndrew Morton <akpm@linux-foundation.org>2023-04-05 19:42:58 -0700
commit0173db4f7f526540e2cc0a6a61e42771acd4c197 (patch)
treec9eea7591483718b7e60a8313c4fa048f1a59ef2 /include/linux/mmap_lock.h
parentmm/mmap/vma_merge: explicitly assign res, vma, extend invariants (diff)
downloadwireguard-linux-0173db4f7f526540e2cc0a6a61e42771acd4c197.tar.xz
wireguard-linux-0173db4f7f526540e2cc0a6a61e42771acd4c197.zip
mm/mmap/vma_merge: init cleanup, be explicit about the non-mergeable case
Rather than setting err = -1 and only resetting if we hit merge cases, explicitly check the non-mergeable case to make it abundantly clear that we only proceed with the rest if something is mergeable, default err to 0 and only update if an error might occur. Move the merge_prev, merge_next cases closer to the logic determining curr, next and reorder initial variables so they are more logically grouped. This has no functional impact. Link: https://lkml.kernel.org/r/99259fbc6403e80e270e1cc4612abbc8620b121b.1679516210.git.lstoakes@gmail.com Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com> Reviewed-by: Vlastimil Babka <vbabka@suse.cz> Cc: David Hildenbrand <david@redhat.com> Cc: Liam R. Howlett <Liam.Howlett@oracle.com> Cc: Matthew Wilcox (Oracle) <willy@infradead.org> Cc: Vernon Yang <vernon2gm@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux/mmap_lock.h')
0 files changed, 0 insertions, 0 deletions