Lines Matching refs:ctx
796 struct hugetlbfs_fs_context *ctx)
803 inode->i_mode = S_IFDIR | ctx->mode;
804 inode->i_uid = ctx->uid;
805 inode->i_gid = ctx->gid;
1235 struct hugetlbfs_fs_context *ctx = fc->fs_private;
1247 ctx->uid = make_kuid(current_user_ns(), result.uint_32);
1248 if (!uid_valid(ctx->uid))
1253 ctx->gid = make_kgid(current_user_ns(), result.uint_32);
1254 if (!gid_valid(ctx->gid))
1259 ctx->mode = result.uint_32 & 01777U;
1266 ctx->max_size_opt = memparse(param->string, &rest);
1267 ctx->max_val_type = SIZE_STD;
1269 ctx->max_val_type = SIZE_PERCENT;
1276 ctx->nr_inodes = memparse(param->string, &rest);
1281 ctx->hstate = size_to_hstate(ps);
1282 if (!ctx->hstate) {
1292 ctx->min_size_opt = memparse(param->string, &rest);
1293 ctx->min_val_type = SIZE_STD;
1295 ctx->min_val_type = SIZE_PERCENT;
1312 struct hugetlbfs_fs_context *ctx = fc->fs_private;
1318 ctx->max_hpages = hugetlbfs_size_to_hpages(ctx->hstate,
1319 ctx->max_size_opt,
1320 ctx->max_val_type);
1321 ctx->min_hpages = hugetlbfs_size_to_hpages(ctx->hstate,
1322 ctx->min_size_opt,
1323 ctx->min_val_type);
1328 if (ctx->max_val_type > NO_SIZE &&
1329 ctx->min_hpages > ctx->max_hpages) {
1340 struct hugetlbfs_fs_context *ctx = fc->fs_private;
1348 sbinfo->hstate = ctx->hstate;
1349 sbinfo->max_inodes = ctx->nr_inodes;
1350 sbinfo->free_inodes = ctx->nr_inodes;
1352 sbinfo->uid = ctx->uid;
1353 sbinfo->gid = ctx->gid;
1354 sbinfo->mode = ctx->mode;
1361 if (ctx->max_hpages != -1 || ctx->min_hpages != -1) {
1362 sbinfo->spool = hugepage_new_subpool(ctx->hstate,
1363 ctx->max_hpages,
1364 ctx->min_hpages);
1369 sb->s_blocksize = huge_page_size(ctx->hstate);
1370 sb->s_blocksize_bits = huge_page_shift(ctx->hstate);
1380 sb->s_root = d_make_root(hugetlbfs_get_root(sb, ctx));
1411 struct hugetlbfs_fs_context *ctx;
1413 ctx = kzalloc(sizeof(struct hugetlbfs_fs_context), GFP_KERNEL);
1414 if (!ctx)
1417 ctx->max_hpages = -1; /* No limit on size by default */
1418 ctx->nr_inodes = -1; /* No limit on number of inodes by default */
1419 ctx->uid = current_fsuid();
1420 ctx->gid = current_fsgid();
1421 ctx->mode = 0755;
1422 ctx->hstate = &default_hstate;
1423 ctx->min_hpages = -1; /* No default minimum size */
1424 ctx->max_val_type = NO_SIZE;
1425 ctx->min_val_type = NO_SIZE;
1426 fc->fs_private = ctx;
1529 struct hugetlbfs_fs_context *ctx = fc->fs_private;
1530 ctx->hstate = h;