Lines Matching refs:ctx

752 	struct fuse_fs_context *ctx = fsc->fs_private;
779 if (ctx->subtype)
781 ctx->subtype = param->string;
786 ctx->fd = result.uint_32;
787 ctx->fd_present = true;
793 ctx->rootmode = result.uint_32;
794 ctx->rootmode_present = true;
798 ctx->user_id = make_kuid(fsc->user_ns, result.uint_32);
799 if (!uid_valid(ctx->user_id))
801 ctx->user_id_present = true;
805 ctx->group_id = make_kgid(fsc->user_ns, result.uint_32);
806 if (!gid_valid(ctx->group_id))
808 ctx->group_id_present = true;
812 ctx->default_permissions = true;
816 ctx->allow_other = true;
820 ctx->max_read = result.uint_32;
824 if (!ctx->is_bdev)
826 ctx->blksize = result.uint_32;
838 struct fuse_fs_context *ctx = fsc->fs_private;
840 if (ctx) {
841 kfree(ctx->subtype);
842 kfree(ctx);
1620 int fuse_fill_super_common(struct super_block *sb, struct fuse_fs_context *ctx)
1636 if (ctx->is_bdev) {
1639 if (!sb_set_blocksize(sb, ctx->blksize))
1647 sb->s_subtype = ctx->subtype;
1648 ctx->subtype = NULL;
1650 err = fuse_dax_conn_alloc(fc, ctx->dax_mode, ctx->dax_dev);
1655 if (ctx->fudptr) {
1673 fc->default_permissions = ctx->default_permissions;
1674 fc->allow_other = ctx->allow_other;
1675 fc->user_id = ctx->user_id;
1676 fc->group_id = ctx->group_id;
1677 fc->legacy_opts_show = ctx->legacy_opts_show;
1678 fc->max_read = max_t(unsigned int, 4096, ctx->max_read);
1679 fc->destroy = ctx->destroy;
1680 fc->no_control = ctx->no_control;
1681 fc->no_force_umount = ctx->no_force_umount;
1684 root = fuse_get_root_inode(sb, ctx->rootmode);
1694 if (ctx->fudptr && *ctx->fudptr)
1703 if (ctx->fudptr)
1704 *ctx->fudptr = fud;
1724 struct fuse_fs_context *ctx = fsc->fs_private;
1727 if (!ctx->file || !ctx->rootmode_present ||
1728 !ctx->user_id_present || !ctx->group_id_present)
1735 if ((ctx->file->f_op != &fuse_dev_operations) ||
1736 (ctx->file->f_cred->user_ns != sb->s_user_ns))
1738 ctx->fudptr = &ctx->file->private_data;
1740 err = fuse_fill_super_common(sb, ctx);
1766 struct fuse_fs_context *ctx = fsc->fs_private;
1788 if (ctx->fd_present)
1789 ctx->file = fget(ctx->fd);
1791 if (IS_ENABLED(CONFIG_BLOCK) && ctx->is_bdev) {
1800 if (!ctx->file)
1807 fud = READ_ONCE(ctx->file->private_data);
1808 if (ctx->file->f_op == &fuse_dev_operations && fud) {
1820 if (ctx->file)
1821 fput(ctx->file);
1837 struct fuse_fs_context *ctx;
1839 ctx = kzalloc(sizeof(struct fuse_fs_context), GFP_KERNEL);
1840 if (!ctx)
1843 ctx->max_read = ~0;
1844 ctx->blksize = FUSE_DEFAULT_BLKSIZE;
1845 ctx->legacy_opts_show = true;
1849 ctx->is_bdev = true;
1850 ctx->destroy = true;
1854 fsc->fs_private = ctx;