summaryrefslogtreecommitdiffstats
path: root/fs/fuse
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@redhat.com>2021-10-21 10:01:39 +0200
committerMiklos Szeredi <mszeredi@redhat.com>2021-10-21 10:01:39 +0200
commit964d32e512670c7b87870e30cfed2303da86d614 (patch)
tree4d079f49dd22cf4f2f8c2e1840239c2163c7a4de /fs/fuse
parent80019f1138324b6f35ae728b4f25eeb08899b452 (diff)
downloadlinux-964d32e512670c7b87870e30cfed2303da86d614.tar.gz
linux-964d32e512670c7b87870e30cfed2303da86d614.tar.bz2
linux-964d32e512670c7b87870e30cfed2303da86d614.zip
fuse: clean up error exits in fuse_fill_super()
Instead of "goto err", return error directly, since there's no error cleanup to do now. Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/fuse')
-rw-r--r--fs/fuse/inode.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index b468f55634f2..12d49a1914e8 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -1566,22 +1566,18 @@ static int fuse_fill_super(struct super_block *sb, struct fs_context *fsc)
* Require mount to happen from the same user namespace which
* opened /dev/fuse to prevent potential attacks.
*/
- err = -EINVAL;
if ((ctx->file->f_op != &fuse_dev_operations) ||
(ctx->file->f_cred->user_ns != sb->s_user_ns))
- goto err;
+ return -EINVAL;
ctx->fudptr = &ctx->file->private_data;
err = fuse_fill_super_common(sb, ctx);
if (err)
- goto err;
+ return err;
/* file->private_data shall be visible on all CPUs after this */
smp_mb();
fuse_send_init(get_fuse_mount_super(sb));
return 0;
-
- err:
- return err;
}
/*