Lines Matching defs:fc

25 static int mtd_test_super(struct super_block *sb, struct fs_context *fc)
27 struct mtd_info *mtd = fc->sget_key;
29 if (sb->s_mtd == fc->sget_key) {
45 static int mtd_set_super(struct super_block *sb, struct fs_context *fc)
47 sb->s_mtd = fc->sget_key;
56 static int mtd_get_sb(struct fs_context *fc,
64 fc->sget_key = mtd;
65 sb = sget_fc(fc, mtd_test_super, mtd_set_super);
79 ret = fill_super(sb, fc);
86 BUG_ON(fc->root);
87 fc->root = dget(sb->s_root);
98 static int mtd_get_sb_by_nr(struct fs_context *fc, int mtdnr,
106 errorf(fc, "MTDSB: Device #%u doesn't appear to exist\n", mtdnr);
110 return mtd_get_sb(fc, mtd, fill_super);
115 * @fc: The filesystem context holding the parameters
118 int get_tree_mtd(struct fs_context *fc,
120 struct fs_context *fc))
128 if (!fc->source)
129 return invalf(fc, "No source specified");
131 pr_debug("MTDSB: dev_name \"%s\"\n", fc->source);
138 if (fc->source[0] == 'm' &&
139 fc->source[1] == 't' &&
140 fc->source[2] == 'd') {
141 if (fc->source[3] == ':') {
146 fc->source + 4);
148 mtd = get_mtd_device_nm(fc->source + 4);
150 return mtd_get_sb(fc, mtd, fill_super);
152 errorf(fc, "MTD: MTD device with name \"%s\" not found",
153 fc->source + 4);
155 } else if (isdigit(fc->source[3])) {
159 mtdnr = simple_strtoul(fc->source + 3, &endptr, 0);
163 return mtd_get_sb_by_nr(fc, mtdnr, fill_super);
172 bdev = lookup_bdev(fc->source);
175 errorf(fc, "MTD: Couldn't look up '%s': %d", fc->source, ret);
185 return mtd_get_sb_by_nr(fc, mtdnr, fill_super);
189 if (!(fc->sb_flags & SB_SILENT))
190 errorf(fc, "MTD: Attempt to mount non-MTD device \"%s\"",
191 fc->source);