Lines Matching refs:ctx
3453 struct shmem_options *ctx = fc->fs_private;
3476 ctx->blocks = DIV_ROUND_UP(size, PAGE_SIZE);
3477 ctx->seen |= SHMEM_SEEN_BLOCKS;
3480 ctx->blocks = memparse(param->string, &rest);
3483 ctx->seen |= SHMEM_SEEN_BLOCKS;
3486 ctx->inodes = memparse(param->string, &rest);
3489 ctx->seen |= SHMEM_SEEN_INODES;
3492 ctx->mode = result.uint_32 & 07777;
3506 ctx->uid = kuid;
3520 ctx->gid = kgid;
3523 ctx->huge = result.uint_32;
3524 if (ctx->huge != SHMEM_HUGE_NEVER &&
3528 ctx->seen |= SHMEM_SEEN_HUGE;
3532 mpol_put(ctx->mpol);
3533 ctx->mpol = NULL;
3534 if (mpol_parse_str(param->string, &ctx->mpol))
3540 ctx->full_inums = false;
3541 ctx->seen |= SHMEM_SEEN_INUMS;
3548 ctx->full_inums = true;
3549 ctx->seen |= SHMEM_SEEN_INUMS;
3613 struct shmem_options *ctx = fc->fs_private;
3620 if ((ctx->seen & SHMEM_SEEN_BLOCKS) && ctx->blocks) {
3626 ctx->blocks) > 0) {
3631 if ((ctx->seen & SHMEM_SEEN_INODES) && ctx->inodes) {
3636 if (ctx->inodes < inodes) {
3642 if ((ctx->seen & SHMEM_SEEN_INUMS) && !ctx->full_inums &&
3648 if (ctx->seen & SHMEM_SEEN_HUGE)
3649 sbinfo->huge = ctx->huge;
3650 if (ctx->seen & SHMEM_SEEN_INUMS)
3651 sbinfo->full_inums = ctx->full_inums;
3652 if (ctx->seen & SHMEM_SEEN_BLOCKS)
3653 sbinfo->max_blocks = ctx->blocks;
3654 if (ctx->seen & SHMEM_SEEN_INODES) {
3655 sbinfo->max_inodes = ctx->inodes;
3656 sbinfo->free_inodes = ctx->inodes - inodes;
3662 if (ctx->mpol) {
3664 sbinfo->mpol = ctx->mpol; /* transfers initial ref */
3665 ctx->mpol = NULL;
3738 struct shmem_options *ctx = fc->fs_private;
3758 if (!(ctx->seen & SHMEM_SEEN_BLOCKS))
3759 ctx->blocks = shmem_default_max_blocks();
3760 if (!(ctx->seen & SHMEM_SEEN_INODES))
3761 ctx->inodes = shmem_default_max_inodes();
3762 if (!(ctx->seen & SHMEM_SEEN_INUMS))
3763 ctx->full_inums = IS_ENABLED(CONFIG_TMPFS_INODE64);
3772 sbinfo->max_blocks = ctx->blocks;
3773 sbinfo->free_inodes = sbinfo->max_inodes = ctx->inodes;
3779 sbinfo->uid = ctx->uid;
3780 sbinfo->gid = ctx->gid;
3781 sbinfo->full_inums = ctx->full_inums;
3782 sbinfo->mode = ctx->mode;
3783 sbinfo->huge = ctx->huge;
3784 sbinfo->mpol = ctx->mpol;
3785 ctx->mpol = NULL;
3829 struct shmem_options *ctx = fc->fs_private;
3831 if (ctx) {
3832 mpol_put(ctx->mpol);
3833 kfree(ctx);
3985 struct shmem_options *ctx;
3987 ctx = kzalloc(sizeof(struct shmem_options), GFP_KERNEL);
3988 if (!ctx)
3991 ctx->mode = 0777 | S_ISVTX;
3992 ctx->uid = current_fsuid();
3993 ctx->gid = current_fsgid();
3995 fc->fs_private = ctx;