Lines Matching refs:fc
25 static int mtd_get_sb(struct fs_context *fc,
33 sb = sget_dev(fc, MKDEV(MTD_BLOCK_MAJOR, mtd->index));
57 ret = fill_super(sb, fc);
64 BUG_ON(fc->root);
65 fc->root = dget(sb->s_root);
76 static int mtd_get_sb_by_nr(struct fs_context *fc, int mtdnr,
84 errorf(fc, "MTDSB: Device #%u doesn't appear to exist\n", mtdnr);
88 return mtd_get_sb(fc, mtd, fill_super);
93 * @fc: The filesystem context holding the parameters
96 int get_tree_mtd(struct fs_context *fc,
98 struct fs_context *fc))
106 if (!fc->source)
107 return invalf(fc, "No source specified");
109 pr_debug("MTDSB: dev_name \"%s\"\n", fc->source);
116 if (fc->source[0] == 'm' &&
117 fc->source[1] == 't' &&
118 fc->source[2] == 'd') {
119 if (fc->source[3] == ':') {
124 fc->source + 4);
126 mtd = get_mtd_device_nm(fc->source + 4);
128 return mtd_get_sb(fc, mtd, fill_super);
130 errorf(fc, "MTD: MTD device with name \"%s\" not found",
131 fc->source + 4);
133 } else if (isdigit(fc->source[3])) {
137 mtdnr = simple_strtoul(fc->source + 3, &endptr, 0);
141 return mtd_get_sb_by_nr(fc, mtdnr, fill_super);
150 ret = lookup_bdev(fc->source, &dev);
152 errorf(fc, "MTD: Couldn't look up '%s': %d", fc->source, ret);
158 return mtd_get_sb_by_nr(fc, MINOR(dev), fill_super);
162 if (!(fc->sb_flags & SB_SILENT))
163 errorf(fc, "MTD: Attempt to mount non-MTD device \"%s\"",
164 fc->source);