Quoting Sergey Senozhatsky (2019-08-02 14:49:55)
On (08/02/19 14:41), Chris Wilson wrote: [..]
struct vfsmount *kern_mount(struct file_system_type *type) { struct vfsmount *mnt; mnt = vfs_kern_mount(type, SB_KERNMOUNT, type->name, NULL); if (!IS_ERR(mnt)) { /* * it is a longterm mount, don't release mnt until * we unmount before file sys is unregistered */ real_mount(mnt)->mnt_ns = MNT_NS_INTERNAL; } return mnt; }
With the exception of fiddling with MNT_NS_INTERNAL, it seems amenable for our needs.
Sorry, not sure I understand. i915 use kern_mount() at the moment.
Since we still need to put_filesystem(), I'd probably add one more patch - export put_filesystem()
so then we can put_filesystem() in i915. Wonder what would happen if someone would do modprobe i915 rmmod i916 In a loop.
So something like this (this is against current patch set).
Yes, that's what I in mind. I was thinking of whether we can replace our kern_mount + fc->ops->reconfigure() into a single vfs_kern_mount(), and whether or not that works with get_fs_type("tmpfs"). -Chris