On 10.08.22 11:12, David Laight wrote:
From: David Hildenbrand
Sent: 09 August 2022 21:57
...
These two functions seem to contain a lot of the same tests.
Yes, but after Linus and I discussed to not even reuse is_cow_mapping() but instead to spell it out, I refrained from factoring common checks out here to harm readability.
[...]
Perhaps only the initial call (common success path?) should be inlined? With the flags and vma tests being moved to an inline helper.
Do we really care enough to hurt readability? I mean, most things here are simple bit checks, not expensive function calls.
inline is only a hint to the compiler after all. Please correct me if I'm wrong.
Now, I don't have any strong opinion, but I do want to make progress for this because -stable trees still need fixing and I'll be posting the reproducer on Monday.
Thanks