Lines Matching +full:2 +full:- +full:cell
1 // SPDX-License-Identifier: GPL-2.0-or-later
46 static const char afs_root_volume[] = "root.cell";
56 return ERR_PTR(-EREMOTE); in afs_mntpt_lookup()
65 return -EREMOTE; in afs_mntpt_open()
73 struct afs_fs_context *ctx = fc->fs_private; in afs_mntpt_set_params()
74 struct afs_super_info *src_as = AFS_FS_S(mntpt->d_sb); in afs_mntpt_set_params()
76 struct afs_cell *cell; in afs_mntpt_set_params() local
80 if (fc->net_ns != src_as->net_ns) { in afs_mntpt_set_params()
81 put_net(fc->net_ns); in afs_mntpt_set_params()
82 fc->net_ns = get_net(src_as->net_ns); in afs_mntpt_set_params()
85 if (src_as->volume && src_as->volume->type == AFSVL_RWVOL) { in afs_mntpt_set_params()
86 ctx->type = AFSVL_RWVOL; in afs_mntpt_set_params()
87 ctx->force = true; in afs_mntpt_set_params()
89 if (ctx->cell) { in afs_mntpt_set_params()
90 afs_unuse_cell(ctx->net, ctx->cell, afs_cell_trace_unuse_mntpt); in afs_mntpt_set_params()
91 ctx->cell = NULL; in afs_mntpt_set_params()
93 if (test_bit(AFS_VNODE_PSEUDODIR, &vnode->flags)) { in afs_mntpt_set_params()
95 unsigned size = mntpt->d_name.len; in afs_mntpt_set_params()
97 if (size < 2) in afs_mntpt_set_params()
98 return -ENOENT; in afs_mntpt_set_params()
100 p = mntpt->d_name.name; in afs_mntpt_set_params()
101 if (mntpt->d_name.name[0] == '.') { in afs_mntpt_set_params()
102 size--; in afs_mntpt_set_params()
104 ctx->type = AFSVL_RWVOL; in afs_mntpt_set_params()
105 ctx->force = true; in afs_mntpt_set_params()
108 return -ENAMETOOLONG; in afs_mntpt_set_params()
110 cell = afs_lookup_cell(ctx->net, p, size, NULL, false); in afs_mntpt_set_params()
111 if (IS_ERR(cell)) { in afs_mntpt_set_params()
112 pr_err("kAFS: unable to lookup cell '%pd'\n", mntpt); in afs_mntpt_set_params()
113 return PTR_ERR(cell); in afs_mntpt_set_params()
115 ctx->cell = cell; in afs_mntpt_set_params()
117 ctx->volname = afs_root_volume; in afs_mntpt_set_params()
118 ctx->volnamesz = sizeof(afs_root_volume) - 1; in afs_mntpt_set_params()
125 if (src_as->cell) in afs_mntpt_set_params()
126 ctx->cell = afs_use_cell(src_as->cell, afs_cell_trace_use_mntpt); in afs_mntpt_set_params()
128 if (size < 2 || size > PAGE_SIZE - 1) in afs_mntpt_set_params()
129 return -EINVAL; in afs_mntpt_set_params()
131 page = read_mapping_page(d_inode(mntpt)->i_mapping, 0, NULL); in afs_mntpt_set_params()
136 ret = -EINVAL; in afs_mntpt_set_params()
137 if (buf[size - 1] == '.') in afs_mntpt_set_params()
138 ret = vfs_parse_fs_string(fc, "source", buf, size - 1); in afs_mntpt_set_params()
145 if (src_as->volume && src_as->volume->type == AFSVL_BACKVOL && in afs_mntpt_set_params()
146 ctx->type == AFSVL_BACKVOL) in afs_mntpt_set_params()
147 return -ENODEV; in afs_mntpt_set_params()
185 _enter("{%pd}", path->dentry); in afs_d_automount()
187 newmnt = afs_mntpt_do_automount(path->dentry); in afs_d_automount()