]> git.baikalelectronics.ru Git - kernel.git/commit
mm: split out the non-present case from copy_one_pte()
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 23 Sep 2020 16:56:59 +0000 (09:56 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 23 Sep 2020 16:56:59 +0000 (09:56 -0700)
commit2929e151ea6426a110064063f94ca2689c98293c
treec5a4e7266d1e4c4841b4d166dfc9a31ad6fcc8c3
parent628b9a44bd6f3ab2da9524ed5de0bf28b2069868
mm: split out the non-present case from copy_one_pte()

This is a purely mechanical split of the copy_one_pte() function.  It's
not immediately obvious when looking at the diff because of the
indentation change, but the way to see what is going on in this commit
is to use the "-w" flag to not show pure whitespace changes, and you see
how the first part of copy_one_pte() is simply lifted out into a
separate function.

And since the non-present case is marked unlikely, don't make the new
function be inlined.  Not that gcc really seems to care, since it looks
like it will inline it anyway due to the whole "single callsite for
static function" logic.  In fact, code generation with the function
split is almost identical to before.  But not marking it inline is the
right thing to do.

This is pure prep-work and cleanup for subsequent changes.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memory.c