Re: [PATCH v2] kill vfs_submount()

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

 



On Mon, 5 May 2025 22:38:29 +0100
Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:

> @@ -10084,10 +10087,20 @@ static struct vfsmount *trace_automount(struct dentry *mntpt, void *ingore)
>  	type = get_fs_type("tracefs");
>  	if (!type)
>  		return NULL;
> -	mnt = vfs_submount(mntpt, type, "tracefs", NULL);
> +
> +	fc = fs_context_for_submount(type, mntpt);
>  	put_filesystem(type);
> -	if (IS_ERR(mnt))
> -		return NULL;
> +	if (IS_ERR(fc))
> +		return ERR_CAST(fc);
> +
> +	ret = vfs_parse_fs_string(fc, "source",
> +				  "tracefs", strlen("tracefs"));
> +	if (!ret)
> +		mnt = fc_mount(fc);
> +	else
> +		mnt = ERR_PTR(ret);
> +
> +	put_fs_context(fc);
>  	return mnt;
>  }
>  

In case others try to apply this on Linus or linux-next, this is based on top of:

  https://lore.kernel.org/all/20250424060845.GG2023217@ZenIV/

Otherwise it doesn't apply cleanly.

Acked-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx>
Tested-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx>

-- Steve




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux