Lines Matching +full:1 +full:- +full:cell
1 // SPDX-License-Identifier: GPL-2.0-or-later
47 static const char afs_root_volume[] = "root.cell";
57 return ERR_PTR(-EREMOTE); in afs_mntpt_lookup()
66 return -EREMOTE; in afs_mntpt_open()
74 struct afs_fs_context *ctx = fc->fs_private; in afs_mntpt_set_params()
75 struct afs_super_info *src_as = AFS_FS_S(mntpt->d_sb); in afs_mntpt_set_params()
77 struct afs_cell *cell; in afs_mntpt_set_params() local
81 if (fc->net_ns != src_as->net_ns) { in afs_mntpt_set_params()
82 put_net(fc->net_ns); in afs_mntpt_set_params()
83 fc->net_ns = get_net(src_as->net_ns); in afs_mntpt_set_params()
86 if (src_as->volume && src_as->volume->type == AFSVL_RWVOL) { in afs_mntpt_set_params()
87 ctx->type = AFSVL_RWVOL; in afs_mntpt_set_params()
88 ctx->force = true; in afs_mntpt_set_params()
90 if (ctx->cell) { in afs_mntpt_set_params()
91 afs_unuse_cell(ctx->net, ctx->cell, afs_cell_trace_unuse_mntpt); in afs_mntpt_set_params()
92 ctx->cell = NULL; in afs_mntpt_set_params()
94 if (test_bit(AFS_VNODE_PSEUDODIR, &vnode->flags)) { in afs_mntpt_set_params()
96 unsigned size = mntpt->d_name.len; in afs_mntpt_set_params()
99 return -ENOENT; in afs_mntpt_set_params()
101 p = mntpt->d_name.name; in afs_mntpt_set_params()
102 if (mntpt->d_name.name[0] == '.') { in afs_mntpt_set_params()
103 size--; in afs_mntpt_set_params()
105 ctx->type = AFSVL_RWVOL; in afs_mntpt_set_params()
106 ctx->force = true; in afs_mntpt_set_params()
109 return -ENAMETOOLONG; in afs_mntpt_set_params()
111 cell = afs_lookup_cell(ctx->net, p, size, NULL, false); in afs_mntpt_set_params()
112 if (IS_ERR(cell)) { in afs_mntpt_set_params()
113 pr_err("kAFS: unable to lookup cell '%pd'\n", mntpt); in afs_mntpt_set_params()
114 return PTR_ERR(cell); in afs_mntpt_set_params()
116 ctx->cell = cell; in afs_mntpt_set_params()
118 ctx->volname = afs_root_volume; in afs_mntpt_set_params()
119 ctx->volnamesz = sizeof(afs_root_volume) - 1; in afs_mntpt_set_params()
126 if (src_as->cell) in afs_mntpt_set_params()
127 ctx->cell = afs_use_cell(src_as->cell, afs_cell_trace_use_mntpt); in afs_mntpt_set_params()
129 if (size < 2 || size > PAGE_SIZE - 1) in afs_mntpt_set_params()
130 return -EINVAL; in afs_mntpt_set_params()
132 page = read_mapping_page(d_inode(mntpt)->i_mapping, 0, NULL); in afs_mntpt_set_params()
143 ret = -EINVAL; in afs_mntpt_set_params()
144 if (buf[size - 1] == '.') in afs_mntpt_set_params()
145 ret = vfs_parse_fs_string(fc, "source", buf, size - 1); in afs_mntpt_set_params()
187 _enter("{%pd}", path->dentry); in afs_d_automount()
189 newmnt = afs_mntpt_do_automount(path->dentry); in afs_d_automount()