Lines Matching refs:new_ns
3418 struct mnt_namespace *new_ns; in alloc_mnt_ns() local
3426 new_ns = kzalloc(sizeof(struct mnt_namespace), GFP_KERNEL_ACCOUNT); in alloc_mnt_ns()
3427 if (!new_ns) { in alloc_mnt_ns()
3432 ret = ns_alloc_inum(&new_ns->ns); in alloc_mnt_ns()
3434 kfree(new_ns); in alloc_mnt_ns()
3439 new_ns->ns.ops = &mntns_operations; in alloc_mnt_ns()
3441 new_ns->seq = atomic64_add_return(1, &mnt_ns_seq); in alloc_mnt_ns()
3442 refcount_set(&new_ns->ns.count, 1); in alloc_mnt_ns()
3443 INIT_LIST_HEAD(&new_ns->list); in alloc_mnt_ns()
3444 init_waitqueue_head(&new_ns->poll); in alloc_mnt_ns()
3445 spin_lock_init(&new_ns->ns_lock); in alloc_mnt_ns()
3446 new_ns->user_ns = get_user_ns(user_ns); in alloc_mnt_ns()
3447 new_ns->ucounts = ucounts; in alloc_mnt_ns()
3448 return new_ns; in alloc_mnt_ns()
3455 struct mnt_namespace *new_ns; in copy_mnt_ns() local
3471 new_ns = alloc_mnt_ns(user_ns, false); in copy_mnt_ns()
3472 if (IS_ERR(new_ns)) in copy_mnt_ns()
3473 return new_ns; in copy_mnt_ns()
3483 free_mnt_ns(new_ns); in copy_mnt_ns()
3491 new_ns->root = new; in copy_mnt_ns()
3492 list_add_tail(&new_ns->list, &new->mnt_list); in copy_mnt_ns()
3502 q->mnt_ns = new_ns; in copy_mnt_ns()
3503 new_ns->mounts++; in copy_mnt_ns()
3528 return new_ns; in copy_mnt_ns()