Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

isofs: convert isofs to use the new mount API

This also renames iso9660_options to isofs_options, for
consistency.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
cc: Jan Kara <jack@suse.cz>
Signed-off-by: Jan Kara <jack@suse.cz>
Message-Id: <409e28da-9c19-427a-acfb-78788f0a23b8@redhat.com>

authored by

Eric Sandeen and committed by
Jan Kara
1b17a46c 5a6cb47e

+237 -230
+237 -230
fs/isofs/inode.c
··· 21 21 #include <linux/ctype.h> 22 22 #include <linux/statfs.h> 23 23 #include <linux/cdrom.h> 24 - #include <linux/parser.h> 25 24 #include <linux/mpage.h> 26 25 #include <linux/user_namespace.h> 27 26 #include <linux/seq_file.h> 28 27 #include <linux/blkdev.h> 28 + #include <linux/fs_context.h> 29 + #include <linux/fs_parser.h> 29 30 30 31 #include "isofs.h" 31 32 #include "zisofs.h" ··· 111 110 kmem_cache_destroy(isofs_inode_cachep); 112 111 } 113 112 114 - static int isofs_remount(struct super_block *sb, int *flags, char *data) 113 + static int isofs_reconfigure(struct fs_context *fc) 115 114 { 116 - sync_filesystem(sb); 117 - if (!(*flags & SB_RDONLY)) 115 + sync_filesystem(fc->root->d_sb); 116 + if (!(fc->sb_flags & SB_RDONLY)) 118 117 return -EROFS; 119 118 return 0; 120 119 } ··· 124 123 .free_inode = isofs_free_inode, 125 124 .put_super = isofs_put_super, 126 125 .statfs = isofs_statfs, 127 - .remount_fs = isofs_remount, 128 126 .show_options = isofs_show_options, 129 127 }; 130 128 ··· 145 145 #endif 146 146 }; 147 147 148 - struct iso9660_options{ 148 + struct isofs_options{ 149 149 unsigned int rock:1; 150 150 unsigned int joliet:1; 151 151 unsigned int cruft:1; ··· 289 289 #endif 290 290 291 291 enum { 292 - Opt_block, Opt_check_r, Opt_check_s, Opt_cruft, Opt_gid, Opt_ignore, 293 - Opt_iocharset, Opt_map_a, Opt_map_n, Opt_map_o, Opt_mode, Opt_nojoliet, 294 - Opt_norock, Opt_sb, Opt_session, Opt_uid, Opt_unhide, Opt_utf8, Opt_err, 295 - Opt_nocompress, Opt_hide, Opt_showassoc, Opt_dmode, Opt_overriderockperm, 292 + Opt_block, Opt_check, Opt_cruft, Opt_gid, Opt_ignore, Opt_iocharset, 293 + Opt_map, Opt_mode, Opt_nojoliet, Opt_norock, Opt_sb, Opt_session, 294 + Opt_uid, Opt_unhide, Opt_utf8, Opt_err, Opt_nocompress, Opt_hide, 295 + Opt_showassoc, Opt_dmode, Opt_overriderockperm, 296 296 }; 297 297 298 - static const match_table_t tokens = { 299 - {Opt_norock, "norock"}, 300 - {Opt_nojoliet, "nojoliet"}, 301 - {Opt_unhide, "unhide"}, 302 - {Opt_hide, "hide"}, 303 - {Opt_showassoc, "showassoc"}, 304 - {Opt_cruft, "cruft"}, 305 - {Opt_utf8, "utf8"}, 306 - {Opt_iocharset, "iocharset=%s"}, 307 - {Opt_map_a, "map=acorn"}, 308 - {Opt_map_a, "map=a"}, 309 - {Opt_map_n, "map=normal"}, 310 - {Opt_map_n, "map=n"}, 311 - {Opt_map_o, "map=off"}, 312 - {Opt_map_o, "map=o"}, 313 - {Opt_session, "session=%u"}, 314 - {Opt_sb, "sbsector=%u"}, 315 - {Opt_check_r, "check=relaxed"}, 316 - {Opt_check_r, "check=r"}, 317 - {Opt_check_s, "check=strict"}, 318 - {Opt_check_s, "check=s"}, 319 - {Opt_uid, "uid=%u"}, 320 - {Opt_gid, "gid=%u"}, 321 - {Opt_mode, "mode=%u"}, 322 - {Opt_dmode, "dmode=%u"}, 323 - {Opt_overriderockperm, "overriderockperm"}, 324 - {Opt_block, "block=%u"}, 325 - {Opt_ignore, "conv=binary"}, 326 - {Opt_ignore, "conv=b"}, 327 - {Opt_ignore, "conv=text"}, 328 - {Opt_ignore, "conv=t"}, 329 - {Opt_ignore, "conv=mtext"}, 330 - {Opt_ignore, "conv=m"}, 331 - {Opt_ignore, "conv=auto"}, 332 - {Opt_ignore, "conv=a"}, 333 - {Opt_nocompress, "nocompress"}, 334 - {Opt_err, NULL} 298 + static const struct constant_table isofs_param_map[] = { 299 + {"acorn", 'a'}, 300 + {"a", 'a'}, 301 + {"normal", 'n'}, 302 + {"n", 'n'}, 303 + {"off", 'o'}, 304 + {"o", 'o'}, 305 + {} 335 306 }; 336 307 337 - static int parse_options(char *options, struct iso9660_options *popt) 308 + static const struct constant_table isofs_param_check[] = { 309 + {"relaxed", 'r'}, 310 + {"r", 'r'}, 311 + {"strict", 's'}, 312 + {"s", 's'}, 313 + {} 314 + }; 315 + 316 + static const struct fs_parameter_spec isofs_param_spec[] = { 317 + fsparam_flag ("norock", Opt_norock), 318 + fsparam_flag ("nojoliet", Opt_nojoliet), 319 + fsparam_flag ("unhide", Opt_unhide), 320 + fsparam_flag ("hide", Opt_hide), 321 + fsparam_flag ("showassoc", Opt_showassoc), 322 + fsparam_flag ("cruft", Opt_cruft), 323 + fsparam_flag ("utf8", Opt_utf8), 324 + fsparam_string ("iocharset", Opt_iocharset), 325 + fsparam_enum ("map", Opt_map, isofs_param_map), 326 + fsparam_u32 ("session", Opt_session), 327 + fsparam_u32 ("sbsector", Opt_sb), 328 + fsparam_enum ("check", Opt_check, isofs_param_check), 329 + fsparam_u32 ("uid", Opt_uid), 330 + fsparam_u32 ("gid", Opt_gid), 331 + /* Note: mode/dmode historically accepted %u not strictly %o */ 332 + fsparam_u32 ("mode", Opt_mode), 333 + fsparam_u32 ("dmode", Opt_dmode), 334 + fsparam_flag ("overriderockperm", Opt_overriderockperm), 335 + fsparam_u32 ("block", Opt_block), 336 + fsparam_string ("conv", Opt_ignore), 337 + fsparam_flag ("nocompress", Opt_nocompress), 338 + {} 339 + }; 340 + 341 + static int isofs_parse_param(struct fs_context *fc, 342 + struct fs_parameter *param) 338 343 { 339 - char *p; 340 - int option; 341 - unsigned int uv; 344 + struct isofs_options *popt = fc->fs_private; 345 + struct fs_parse_result result; 346 + int opt; 347 + kuid_t uid; 348 + kgid_t gid; 349 + unsigned int n; 342 350 343 - popt->map = 'n'; 344 - popt->rock = 1; 345 - popt->joliet = 1; 346 - popt->cruft = 0; 347 - popt->hide = 0; 348 - popt->showassoc = 0; 349 - popt->check = 'u'; /* unset */ 350 - popt->nocompress = 0; 351 - popt->blocksize = 1024; 352 - popt->fmode = popt->dmode = ISOFS_INVALID_MODE; 353 - popt->uid_set = 0; 354 - popt->gid_set = 0; 355 - popt->gid = GLOBAL_ROOT_GID; 356 - popt->uid = GLOBAL_ROOT_UID; 357 - popt->iocharset = NULL; 358 - popt->overriderockperm = 0; 359 - popt->session=-1; 360 - popt->sbsector=-1; 361 - if (!options) 362 - return 1; 351 + /* There are no remountable options */ 352 + if (fc->purpose == FS_CONTEXT_FOR_RECONFIGURE) 353 + return 0; 363 354 364 - while ((p = strsep(&options, ",")) != NULL) { 365 - int token; 366 - substring_t args[MAX_OPT_ARGS]; 367 - unsigned n; 355 + opt = fs_parse(fc, isofs_param_spec, param, &result); 356 + if (opt < 0) 357 + return opt; 368 358 369 - if (!*p) 370 - continue; 371 - 372 - token = match_token(p, tokens, args); 373 - switch (token) { 374 - case Opt_norock: 375 - popt->rock = 0; 376 - break; 377 - case Opt_nojoliet: 378 - popt->joliet = 0; 379 - break; 380 - case Opt_hide: 381 - popt->hide = 1; 382 - break; 383 - case Opt_unhide: 384 - case Opt_showassoc: 385 - popt->showassoc = 1; 386 - break; 387 - case Opt_cruft: 388 - popt->cruft = 1; 389 - break; 359 + switch (opt) { 360 + case Opt_norock: 361 + popt->rock = 0; 362 + break; 363 + case Opt_nojoliet: 364 + popt->joliet = 0; 365 + break; 366 + case Opt_hide: 367 + popt->hide = 1; 368 + break; 369 + case Opt_unhide: 370 + case Opt_showassoc: 371 + popt->showassoc = 1; 372 + break; 373 + case Opt_cruft: 374 + popt->cruft = 1; 375 + break; 390 376 #ifdef CONFIG_JOLIET 391 - case Opt_utf8: 392 - kfree(popt->iocharset); 393 - popt->iocharset = kstrdup("utf8", GFP_KERNEL); 394 - if (!popt->iocharset) 395 - return 0; 396 - break; 397 - case Opt_iocharset: 398 - kfree(popt->iocharset); 399 - popt->iocharset = match_strdup(&args[0]); 400 - if (!popt->iocharset) 401 - return 0; 402 - break; 377 + case Opt_utf8: 378 + kfree(popt->iocharset); 379 + popt->iocharset = kstrdup("utf8", GFP_KERNEL); 380 + if (!popt->iocharset) 381 + return -ENOMEM; 382 + break; 383 + case Opt_iocharset: 384 + kfree(popt->iocharset); 385 + popt->iocharset = kstrdup(param->string, GFP_KERNEL); 386 + if (!popt->iocharset) 387 + return -ENOMEM; 388 + break; 403 389 #endif 404 - case Opt_map_a: 405 - popt->map = 'a'; 406 - break; 407 - case Opt_map_o: 408 - popt->map = 'o'; 409 - break; 410 - case Opt_map_n: 411 - popt->map = 'n'; 412 - break; 413 - case Opt_session: 414 - if (match_int(&args[0], &option)) 415 - return 0; 416 - n = option; 417 - /* 418 - * Track numbers are supposed to be in range 1-99, the 419 - * mount option starts indexing at 0. 420 - */ 421 - if (n >= 99) 422 - return 0; 423 - popt->session = n + 1; 424 - break; 425 - case Opt_sb: 426 - if (match_int(&args[0], &option)) 427 - return 0; 428 - popt->sbsector = option; 429 - break; 430 - case Opt_check_r: 431 - popt->check = 'r'; 432 - break; 433 - case Opt_check_s: 434 - popt->check = 's'; 435 - break; 436 - case Opt_ignore: 437 - break; 438 - case Opt_uid: 439 - if (match_uint(&args[0], &uv)) 440 - return 0; 441 - popt->uid = make_kuid(current_user_ns(), uv); 442 - if (!uid_valid(popt->uid)) 443 - return 0; 444 - popt->uid_set = 1; 445 - break; 446 - case Opt_gid: 447 - if (match_uint(&args[0], &uv)) 448 - return 0; 449 - popt->gid = make_kgid(current_user_ns(), uv); 450 - if (!gid_valid(popt->gid)) 451 - return 0; 452 - popt->gid_set = 1; 453 - break; 454 - case Opt_mode: 455 - if (match_int(&args[0], &option)) 456 - return 0; 457 - popt->fmode = option; 458 - break; 459 - case Opt_dmode: 460 - if (match_int(&args[0], &option)) 461 - return 0; 462 - popt->dmode = option; 463 - break; 464 - case Opt_overriderockperm: 465 - popt->overriderockperm = 1; 466 - break; 467 - case Opt_block: 468 - if (match_int(&args[0], &option)) 469 - return 0; 470 - n = option; 471 - if (n != 512 && n != 1024 && n != 2048) 472 - return 0; 473 - popt->blocksize = n; 474 - break; 475 - case Opt_nocompress: 476 - popt->nocompress = 1; 477 - break; 478 - default: 479 - return 0; 480 - } 390 + case Opt_map: 391 + popt->map = result.uint_32; 392 + break; 393 + case Opt_session: 394 + n = result.uint_32; 395 + /* 396 + * Track numbers are supposed to be in range 1-99, the 397 + * mount option starts indexing at 0. 398 + */ 399 + if (n >= 99) 400 + return -EINVAL; 401 + popt->session = n + 1; 402 + break; 403 + case Opt_sb: 404 + popt->sbsector = result.uint_32; 405 + break; 406 + case Opt_check: 407 + popt->check = result.uint_32; 408 + break; 409 + case Opt_ignore: 410 + break; 411 + case Opt_uid: 412 + uid = make_kuid(current_user_ns(), result.uint_32); 413 + if (!uid_valid(uid)) 414 + return -EINVAL; 415 + popt->uid = uid; 416 + popt->uid_set = 1; 417 + break; 418 + case Opt_gid: 419 + gid = make_kgid(current_user_ns(), result.uint_32); 420 + if (!gid_valid(gid)) 421 + return -EINVAL; 422 + popt->gid = gid; 423 + popt->gid_set = 1; 424 + break; 425 + case Opt_mode: 426 + popt->fmode = result.uint_32; 427 + break; 428 + case Opt_dmode: 429 + popt->dmode = result.uint_32; 430 + break; 431 + case Opt_overriderockperm: 432 + popt->overriderockperm = 1; 433 + break; 434 + case Opt_block: 435 + n = result.uint_32; 436 + if (n != 512 && n != 1024 && n != 2048) 437 + return -EINVAL; 438 + popt->blocksize = n; 439 + break; 440 + case Opt_nocompress: 441 + popt->nocompress = 1; 442 + break; 443 + default: 444 + return -EINVAL; 481 445 } 482 - return 1; 446 + return 0; 483 447 } 484 448 485 449 /* ··· 579 615 /* 580 616 * Initialize the superblock and read the root inode. 581 617 */ 582 - static int isofs_fill_super(struct super_block *s, void *data, int silent) 618 + static int isofs_fill_super(struct super_block *s, struct fs_context *fc) 583 619 { 584 620 struct buffer_head *bh = NULL, *pri_bh = NULL; 585 621 struct hs_primary_descriptor *h_pri = NULL; ··· 587 623 struct iso_supplementary_descriptor *sec = NULL; 588 624 struct iso_directory_record *rootp; 589 625 struct inode *inode; 590 - struct iso9660_options opt; 626 + struct isofs_options *opt = fc->fs_private; 591 627 struct isofs_sb_info *sbi; 592 628 unsigned long first_data_zone; 593 629 int joliet_level = 0; ··· 595 631 int orig_zonesize; 596 632 int table, error = -EINVAL; 597 633 unsigned int vol_desc_start; 634 + int silent = fc->sb_flags & SB_SILENT; 598 635 599 636 sbi = kzalloc(sizeof(*sbi), GFP_KERNEL); 600 637 if (!sbi) 601 638 return -ENOMEM; 602 639 s->s_fs_info = sbi; 603 - 604 - if (!parse_options((char *)data, &opt)) 605 - goto out_freesbi; 606 640 607 641 /* 608 642 * First of all, get the hardware blocksize for this device. ··· 617 655 bdev_logical_block_size(s->s_bdev)); 618 656 goto out_freesbi; 619 657 } 620 - opt.blocksize = sb_min_blocksize(s, opt.blocksize); 658 + opt->blocksize = sb_min_blocksize(s, opt->blocksize); 621 659 622 660 sbi->s_high_sierra = 0; /* default is iso9660 */ 623 - sbi->s_session = opt.session; 624 - sbi->s_sbsector = opt.sbsector; 661 + sbi->s_session = opt->session; 662 + sbi->s_sbsector = opt->sbsector; 625 663 626 - vol_desc_start = (opt.sbsector != -1) ? 627 - opt.sbsector : isofs_get_last_session(s,opt.session); 664 + vol_desc_start = (opt->sbsector != -1) ? 665 + opt->sbsector : isofs_get_last_session(s, opt->session); 628 666 629 667 for (iso_blknum = vol_desc_start+16; 630 668 iso_blknum < vol_desc_start+100; iso_blknum++) { ··· 658 696 else if (isonum_711(vdp->type) == ISO_VD_SUPPLEMENTARY) { 659 697 sec = (struct iso_supplementary_descriptor *)vdp; 660 698 if (sec->escape[0] == 0x25 && sec->escape[1] == 0x2f) { 661 - if (opt.joliet) { 699 + if (opt->joliet) { 662 700 if (sec->escape[2] == 0x40) 663 701 joliet_level = 1; 664 702 else if (sec->escape[2] == 0x43) ··· 683 721 goto out_freebh; 684 722 685 723 sbi->s_high_sierra = 1; 686 - opt.rock = 0; 724 + opt->rock = 0; 687 725 h_pri = (struct hs_primary_descriptor *)vdp; 688 726 goto root_found; 689 727 } ··· 711 749 goto out_freebh; 712 750 } 713 751 714 - if (joliet_level && (!pri || !opt.rock)) { 752 + if (joliet_level && (!pri || !opt->rock)) { 715 753 /* This is the case of Joliet with the norock mount flag. 716 754 * A disc with both Joliet and Rock Ridge is handled later 717 755 */ ··· 742 780 * blocks that were 512 bytes (which should only very rarely 743 781 * happen.) 744 782 */ 745 - if (orig_zonesize < opt.blocksize) 783 + if (orig_zonesize < opt->blocksize) 746 784 goto out_bad_size; 747 785 748 786 /* RDE: convert log zone size to bit shift */ ··· 827 865 828 866 #ifdef CONFIG_JOLIET 829 867 if (joliet_level) { 830 - char *p = opt.iocharset ? opt.iocharset : CONFIG_NLS_DEFAULT; 868 + char *p = opt->iocharset ? opt->iocharset : CONFIG_NLS_DEFAULT; 831 869 if (strcmp(p, "utf8") != 0) { 832 - sbi->s_nls_iocharset = opt.iocharset ? 833 - load_nls(opt.iocharset) : load_nls_default(); 870 + sbi->s_nls_iocharset = opt->iocharset ? 871 + load_nls(opt->iocharset) : load_nls_default(); 834 872 if (!sbi->s_nls_iocharset) 835 873 goto out_freesbi; 836 874 } ··· 838 876 #endif 839 877 s->s_op = &isofs_sops; 840 878 s->s_export_op = &isofs_export_ops; 841 - sbi->s_mapping = opt.map; 842 - sbi->s_rock = (opt.rock ? 2 : 0); 879 + sbi->s_mapping = opt->map; 880 + sbi->s_rock = (opt->rock ? 2 : 0); 843 881 sbi->s_rock_offset = -1; /* initial offset, will guess until SP is found*/ 844 - sbi->s_cruft = opt.cruft; 845 - sbi->s_hide = opt.hide; 846 - sbi->s_showassoc = opt.showassoc; 847 - sbi->s_uid = opt.uid; 848 - sbi->s_gid = opt.gid; 849 - sbi->s_uid_set = opt.uid_set; 850 - sbi->s_gid_set = opt.gid_set; 851 - sbi->s_nocompress = opt.nocompress; 852 - sbi->s_overriderockperm = opt.overriderockperm; 882 + sbi->s_cruft = opt->cruft; 883 + sbi->s_hide = opt->hide; 884 + sbi->s_showassoc = opt->showassoc; 885 + sbi->s_uid = opt->uid; 886 + sbi->s_gid = opt->gid; 887 + sbi->s_uid_set = opt->uid_set; 888 + sbi->s_gid_set = opt->gid_set; 889 + sbi->s_nocompress = opt->nocompress; 890 + sbi->s_overriderockperm = opt->overriderockperm; 853 891 /* 854 892 * It would be incredibly stupid to allow people to mark every file 855 893 * on the disk as suid, so we merely allow them to set the default 856 894 * permissions. 857 895 */ 858 - if (opt.fmode != ISOFS_INVALID_MODE) 859 - sbi->s_fmode = opt.fmode & 0777; 896 + if (opt->fmode != ISOFS_INVALID_MODE) 897 + sbi->s_fmode = opt->fmode & 0777; 860 898 else 861 899 sbi->s_fmode = ISOFS_INVALID_MODE; 862 - if (opt.dmode != ISOFS_INVALID_MODE) 863 - sbi->s_dmode = opt.dmode & 0777; 900 + if (opt->dmode != ISOFS_INVALID_MODE) 901 + sbi->s_dmode = opt->dmode & 0777; 864 902 else 865 903 sbi->s_dmode = ISOFS_INVALID_MODE; 866 904 ··· 922 960 } 923 961 } 924 962 925 - if (opt.check == 'u') { 963 + if (opt->check == 'u') { 926 964 /* Only Joliet is case insensitive by default */ 927 965 if (joliet_level) 928 - opt.check = 'r'; 966 + opt->check = 'r'; 929 967 else 930 - opt.check = 's'; 968 + opt->check = 's'; 931 969 } 932 970 sbi->s_joliet_level = joliet_level; 933 971 ··· 942 980 table = 0; 943 981 if (joliet_level) 944 982 table += 2; 945 - if (opt.check == 'r') 983 + if (opt->check == 'r') 946 984 table++; 947 - sbi->s_check = opt.check; 985 + sbi->s_check = opt->check; 948 986 949 987 if (table) 950 988 s->s_d_op = &isofs_dentry_ops[table - 1]; ··· 956 994 goto out_no_inode; 957 995 } 958 996 959 - kfree(opt.iocharset); 997 + kfree(opt->iocharset); 960 998 961 999 return 0; 962 1000 ··· 985 1023 goto out_freebh; 986 1024 out_bad_size: 987 1025 printk(KERN_WARNING "ISOFS: Logical zone size(%d) < hardware blocksize(%u)\n", 988 - orig_zonesize, opt.blocksize); 1026 + orig_zonesize, opt->blocksize); 989 1027 goto out_freebh; 990 1028 out_unknown_format: 991 1029 if (!silent) ··· 995 1033 brelse(bh); 996 1034 brelse(pri_bh); 997 1035 out_freesbi: 998 - kfree(opt.iocharset); 1036 + kfree(opt->iocharset); 999 1037 kfree(sbi); 1000 1038 s->s_fs_info = NULL; 1001 1039 return error; ··· 1529 1567 return inode; 1530 1568 } 1531 1569 1532 - static struct dentry *isofs_mount(struct file_system_type *fs_type, 1533 - int flags, const char *dev_name, void *data) 1570 + static int isofs_get_tree(struct fs_context *fc) 1534 1571 { 1535 - return mount_bdev(fs_type, flags, dev_name, data, isofs_fill_super); 1572 + return get_tree_bdev(fc, isofs_fill_super); 1573 + } 1574 + 1575 + static void isofs_free_fc(struct fs_context *fc) 1576 + { 1577 + kfree(fc->fs_private); 1578 + } 1579 + 1580 + static const struct fs_context_operations isofs_context_ops = { 1581 + .parse_param = isofs_parse_param, 1582 + .get_tree = isofs_get_tree, 1583 + .reconfigure = isofs_reconfigure, 1584 + .free = isofs_free_fc, 1585 + }; 1586 + 1587 + static int isofs_init_fs_context(struct fs_context *fc) 1588 + { 1589 + struct isofs_options *opt; 1590 + 1591 + opt = kzalloc(sizeof(*opt), GFP_KERNEL); 1592 + if (!opt) 1593 + return -ENOMEM; 1594 + 1595 + opt->map = 'n'; 1596 + opt->rock = 1; 1597 + opt->joliet = 1; 1598 + opt->cruft = 0; 1599 + opt->hide = 0; 1600 + opt->showassoc = 0; 1601 + opt->check = 'u'; /* unset */ 1602 + opt->nocompress = 0; 1603 + opt->blocksize = 1024; 1604 + opt->fmode = opt->dmode = ISOFS_INVALID_MODE; 1605 + opt->uid_set = 0; 1606 + opt->gid_set = 0; 1607 + opt->gid = GLOBAL_ROOT_GID; 1608 + opt->uid = GLOBAL_ROOT_UID; 1609 + opt->iocharset = NULL; 1610 + opt->overriderockperm = 0; 1611 + opt->session = -1; 1612 + opt->sbsector = -1; 1613 + 1614 + fc->fs_private = opt; 1615 + fc->ops = &isofs_context_ops; 1616 + 1617 + return 0; 1536 1618 } 1537 1619 1538 1620 static struct file_system_type iso9660_fs_type = { 1539 1621 .owner = THIS_MODULE, 1540 1622 .name = "iso9660", 1541 - .mount = isofs_mount, 1542 1623 .kill_sb = kill_block_super, 1543 1624 .fs_flags = FS_REQUIRES_DEV, 1625 + .init_fs_context = isofs_init_fs_context, 1626 + .parameters = isofs_param_spec, 1544 1627 }; 1545 1628 MODULE_ALIAS_FS("iso9660"); 1546 1629 MODULE_ALIAS("iso9660");