lkml.org 
[lkml]   [2021]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 6/7] fuse: Switch to fc_mount() for submounts
From
Date
On 04.06.21 18:11, Greg Kurz wrote:
> fc_mount() already handles the vfs_get_tree(), sb->s_umount
> unlocking and vfs_create_mount() sequence. Using it greatly
> simplifies fuse_dentry_automount().
>
> Signed-off-by: Greg Kurz <groug@kaod.org>
> ---
> fs/fuse/dir.c | 26 +++++---------------------
> 1 file changed, 5 insertions(+), 21 deletions(-)
>
> diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
> index b88e5785a3dd..fc9eddf7f9b2 100644
> --- a/fs/fuse/dir.c
> +++ b/fs/fuse/dir.c
> @@ -311,38 +311,22 @@ static struct vfsmount *fuse_dentry_automount(struct path *path)
> struct fs_context *fsc;
> struct vfsmount *mnt;
> struct fuse_inode *mp_fi = get_fuse_inode(d_inode(path->dentry));
> - int err;
>
> fsc = fs_context_for_submount(path->mnt->mnt_sb->s_type, path->dentry);
> - if (IS_ERR(fsc)) {
> - err = PTR_ERR(fsc);
> - goto out;
> - }
> + if (IS_ERR(fsc))
> + return (struct vfsmount *) fsc;

I think ERR_CAST(fsc) would be nicer.

Apart from that:

Reviewed-by: Max Reitz <mreitz@redhat.com>

\
 
 \ /
  Last update: 2021-06-08 17:51    [W:0.179 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site