Re: [GIT PULL] XArray for 5.8

From: Linus Torvalds
Date: Wed Jul 22 2020 - 15:01:26 EST


On Wed, Jul 22, 2020 at 11:46 AM Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote:
>
> But I think the real problem is that local_lock_internal.h doesn't include
> <linux/sched.h>. Header files shouldn't depend on other headers to be
> included first.

The big hint is that name: "internal".

Also, we often violate the "shouldn't depend on other headers" rule.
Some basic headers are just that - basic. And some headers are not.

Things like the uapi headers need to be independent, but we've had
circular ordering problems with kernel headers, and sometimes it's
just better to say "you need to just get the basic header first".

Linus