It can be helpful in understanding a code change to use the Git Blame View:
https://github.com/torvalds/linux/blame/a978a5b8d83f795e107a2ff759b28643739be70e/include/linux/skbuff.h
You can see what it says in the description of the commit where the change was made:
net: add opaque struct around skb frag page
I've split this bit out of the skb frag destructor patch since it helps enforce
the use of the fragment API.
So it seems this was done just to catch dangling references in the code which were making raw access to a pointer, and force usage of a higher level API. It shouldn't add any runtime cost.
As an aside: the last time I did this myself I had a kind of silly idea which is to split the name of the struct out to something like struct { struct page *ge; } pa;
...this way the privileged code can read as fragstruct.pa.ge instead of fragstruct.page.p. But outside of that being silly, an advantage of using the same name for the outer struct is helping guide old usages with clear errors.
Though as your confusion points out, a comment // don't access directly, use fragment API
on the p
member would probably have been appropriate in this case.