Re: add file system helpers that take kernel pointers for the init code v4

From: Christoph Hellwig
Date: Mon Aug 03 2020 - 11:08:08 EST


On Mon, Aug 03, 2020 at 10:56:23AM -0400, Qian Cai wrote:
> On Tue, Jul 28, 2020 at 06:33:53PM +0200, Christoph Hellwig wrote:
> > Hi Al and Linus,
> >
> > currently a lot of the file system calls in the early in code (and the
> > devtmpfs kthread) rely on the implicit set_fs(KERNEL_DS) during boot.
> > This is one of the few last remaining places we need to deal with to kill
> > off set_fs entirely, so this series adds new helpers that take kernel
> > pointers. These helpers are in init/ and marked __init and thus will
> > be discarded after bootup. A few also need to be duplicated in devtmpfs,
> > though unfortunately.
>
> Reverting this series from next-20200803 fixed the crash below on shutdown.

Please try this patch:

---