aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mm/swap_state.c
diff options
context:
space:
mode:
authorWei Yang <richard.weiyang@gmail.com>2024-10-15 12:07:46 +0000
committerAndrew Morton <akpm@linux-foundation.org>2024-11-06 20:11:14 -0800
commit908378a30b0972e5bf8fae3cf38affc162fe8e3b (patch)
tree6efa4aa933821ca3d576f955bb4ab600d84c5bee /mm/swap_state.c
parentmaple_tree: total is not changed for nomem_one case (diff)
downloadwireguard-linux-908378a30b0972e5bf8fae3cf38affc162fe8e3b.tar.xz
wireguard-linux-908378a30b0972e5bf8fae3cf38affc162fe8e3b.zip
maple_tree: simplify mas_push_node()
When count is not 0, we know head is valid. So we can put the assignment in if (count) instead of checking the head pointer again. Also count represents current total, we can assign the new total by increasing the count by one. Link: https://lkml.kernel.org/r/20241015120746.15850-4-richard.weiyang@gmail.com Signed-off-by: Wei Yang <richard.weiyang@gmail.com> Reviewed-by: Liam R. Howlett <Liam.Howlett@Oracle.com> Cc: Sidhartha Kumar <sidhartha.kumar@oracle.com> Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/swap_state.c')
0 files changed, 0 insertions, 0 deletions