Re: [PATCH 06/24] md: open code vfs_stat in md_setup_drive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 21, 2020 at 08:27:01PM +0200, Christoph Hellwig wrote:
> On Tue, Jul 21, 2020 at 05:55:39PM +0100, Al Viro wrote:
> > How about fs/for_init.c and putting the damn helpers there?  With
> > calling conventions as close to syscalls as possible, and a fat
> > comment regarding their intended use being _ONLY_ the setup
> > in should-have-been-done-in-userland parts of init?
> 
> Where do you want the prototypes to go?  Also do you want devtmpfs
> use the same helpers, which then't can't be marked __init (mount,
> chdir, chroot), or separate copies?

Hmm...  mount still can be __init (devtmpfs_mount() is), and I suspect
devtmpfs_setup() could also be made such - just turn devtmpfsd()
into
static int __init devtmpfsd(void *p)
{
        int err = devtmpfs_setup(p);

	if (!err)
		devtmpfsd_real();	/* never returns */
	return err;
}
and you are done.  As for the prototypes... include/linux/init_syscalls.h,
perhaps?



[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux