mm/swap: avoid a xa load for swapout path
authorKairui Song <kasong@tencent.com>
Tue, 17 Oct 2023 01:17:28 +0000 (09:17 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 25 Oct 2023 23:47:11 +0000 (16:47 -0700)
commite5b306a082982cb98bc7ec48a382225522401a61
treee00b6ae62076aebb9089890881ef918f4e799a46
parente56808fef8f71a192b2740c0b6ea8be7ab865d54
mm/swap: avoid a xa load for swapout path

A variable is never used for swapout path (shadowp is NULL) and compiler
is unable to optimize out the unneeded load since it's a function call.

The was introduced by 3852f6768ede ("mm/swapcache: support to handle the
shadow entries").

Link: https://lkml.kernel.org/r/20231017011728.37508-1-ryncsn@gmail.com
Signed-off-by: Kairui Song <kasong@tencent.com>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Huang Ying <ying.huang@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/swap_state.c