inode.c (96cafb9ccb153f6a82ff2c9bde68916d9d65501e) inode.c (d7167b149943e38ad610191ecbb0800c78bbced9)
1/*
2 * Resizable simple ram filesystem for Linux.
3 *
4 * Copyright (C) 2000 Linus Torvalds.
5 * 2000 Transmeta Corp.
6 *
7 * Usage limits added by David Gibson, Linuxcare Australia.
8 * This file is released under the GPL.

--- 167 unchanged lines hidden (view full) ---

176 .drop_inode = generic_delete_inode,
177 .show_options = ramfs_show_options,
178};
179
180enum ramfs_param {
181 Opt_mode,
182};
183
1/*
2 * Resizable simple ram filesystem for Linux.
3 *
4 * Copyright (C) 2000 Linus Torvalds.
5 * 2000 Transmeta Corp.
6 *
7 * Usage limits added by David Gibson, Linuxcare Australia.
8 * This file is released under the GPL.

--- 167 unchanged lines hidden (view full) ---

176 .drop_inode = generic_delete_inode,
177 .show_options = ramfs_show_options,
178};
179
180enum ramfs_param {
181 Opt_mode,
182};
183
184static const struct fs_parameter_spec ramfs_param_specs[] = {
184const struct fs_parameter_spec ramfs_fs_parameters[] = {
185 fsparam_u32oct("mode", Opt_mode),
186 {}
187};
188
185 fsparam_u32oct("mode", Opt_mode),
186 {}
187};
188
189const struct fs_parameter_description ramfs_fs_parameters = {
190 .specs = ramfs_param_specs,
191};
192
193static int ramfs_parse_param(struct fs_context *fc, struct fs_parameter *param)
194{
195 struct fs_parse_result result;
196 struct ramfs_fs_info *fsi = fc->s_fs_info;
197 int opt;
198
189static int ramfs_parse_param(struct fs_context *fc, struct fs_parameter *param)
190{
191 struct fs_parse_result result;
192 struct ramfs_fs_info *fsi = fc->s_fs_info;
193 int opt;
194
199 opt = fs_parse(fc, &ramfs_fs_parameters, param, &result);
195 opt = fs_parse(fc, ramfs_fs_parameters, param, &result);
200 if (opt < 0) {
201 /*
202 * We might like to report bad mount options here;
203 * but traditionally ramfs has ignored all mount options,
204 * and as it is used as a !CONFIG_SHMEM simple substitute
205 * for tmpfs, better continue to ignore other mount options.
206 */
207 if (opt == -ENOPARAM)

--- 64 unchanged lines hidden (view full) ---

272{
273 kfree(sb->s_fs_info);
274 kill_litter_super(sb);
275}
276
277static struct file_system_type ramfs_fs_type = {
278 .name = "ramfs",
279 .init_fs_context = ramfs_init_fs_context,
196 if (opt < 0) {
197 /*
198 * We might like to report bad mount options here;
199 * but traditionally ramfs has ignored all mount options,
200 * and as it is used as a !CONFIG_SHMEM simple substitute
201 * for tmpfs, better continue to ignore other mount options.
202 */
203 if (opt == -ENOPARAM)

--- 64 unchanged lines hidden (view full) ---

268{
269 kfree(sb->s_fs_info);
270 kill_litter_super(sb);
271}
272
273static struct file_system_type ramfs_fs_type = {
274 .name = "ramfs",
275 .init_fs_context = ramfs_init_fs_context,
280 .parameters = &ramfs_fs_parameters,
276 .parameters = ramfs_fs_parameters,
281 .kill_sb = ramfs_kill_sb,
282 .fs_flags = FS_USERNS_MOUNT,
283};
284
285static int __init init_ramfs_fs(void)
286{
287 return register_filesystem(&ramfs_fs_type);
288}
289fs_initcall(init_ramfs_fs);
277 .kill_sb = ramfs_kill_sb,
278 .fs_flags = FS_USERNS_MOUNT,
279};
280
281static int __init init_ramfs_fs(void)
282{
283 return register_filesystem(&ramfs_fs_type);
284}
285fs_initcall(init_ramfs_fs);