super.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652
  1. /*
  2. * linux/fs/affs/inode.c
  3. *
  4. * (c) 1996 Hans-Joachim Widmaier - Rewritten
  5. *
  6. * (C) 1993 Ray Burr - Modified for Amiga FFS filesystem.
  7. *
  8. * (C) 1992 Eric Youngdale Modified for ISO 9660 filesystem.
  9. *
  10. * (C) 1991 Linus Torvalds - minix filesystem
  11. */
  12. #include <linux/module.h>
  13. #include <linux/init.h>
  14. #include <linux/statfs.h>
  15. #include <linux/parser.h>
  16. #include <linux/magic.h>
  17. #include <linux/sched.h>
  18. #include <linux/slab.h>
  19. #include <linux/writeback.h>
  20. #include <linux/blkdev.h>
  21. #include "affs.h"
  22. static int affs_statfs(struct dentry *dentry, struct kstatfs *buf);
  23. static int affs_remount (struct super_block *sb, int *flags, char *data);
  24. static void
  25. affs_commit_super(struct super_block *sb, int wait)
  26. {
  27. struct affs_sb_info *sbi = AFFS_SB(sb);
  28. struct buffer_head *bh = sbi->s_root_bh;
  29. struct affs_root_tail *tail = AFFS_ROOT_TAIL(sb, bh);
  30. lock_buffer(bh);
  31. secs_to_datestamp(get_seconds(), &tail->disk_change);
  32. affs_fix_checksum(sb, bh);
  33. unlock_buffer(bh);
  34. mark_buffer_dirty(bh);
  35. if (wait)
  36. sync_dirty_buffer(bh);
  37. }
  38. static void
  39. affs_put_super(struct super_block *sb)
  40. {
  41. struct affs_sb_info *sbi = AFFS_SB(sb);
  42. pr_debug("%s()\n", __func__);
  43. cancel_delayed_work_sync(&sbi->sb_work);
  44. }
  45. static int
  46. affs_sync_fs(struct super_block *sb, int wait)
  47. {
  48. affs_commit_super(sb, wait);
  49. return 0;
  50. }
  51. static void flush_superblock(struct work_struct *work)
  52. {
  53. struct affs_sb_info *sbi;
  54. struct super_block *sb;
  55. sbi = container_of(work, struct affs_sb_info, sb_work.work);
  56. sb = sbi->sb;
  57. spin_lock(&sbi->work_lock);
  58. sbi->work_queued = 0;
  59. spin_unlock(&sbi->work_lock);
  60. affs_commit_super(sb, 1);
  61. }
  62. void affs_mark_sb_dirty(struct super_block *sb)
  63. {
  64. struct affs_sb_info *sbi = AFFS_SB(sb);
  65. unsigned long delay;
  66. if (sb->s_flags & MS_RDONLY)
  67. return;
  68. spin_lock(&sbi->work_lock);
  69. if (!sbi->work_queued) {
  70. delay = msecs_to_jiffies(dirty_writeback_interval * 10);
  71. queue_delayed_work(system_long_wq, &sbi->sb_work, delay);
  72. sbi->work_queued = 1;
  73. }
  74. spin_unlock(&sbi->work_lock);
  75. }
  76. static struct kmem_cache * affs_inode_cachep;
  77. static struct inode *affs_alloc_inode(struct super_block *sb)
  78. {
  79. struct affs_inode_info *i;
  80. i = kmem_cache_alloc(affs_inode_cachep, GFP_KERNEL);
  81. if (!i)
  82. return NULL;
  83. i->vfs_inode.i_version = 1;
  84. i->i_lc = NULL;
  85. i->i_ext_bh = NULL;
  86. i->i_pa_cnt = 0;
  87. return &i->vfs_inode;
  88. }
  89. static void affs_i_callback(struct rcu_head *head)
  90. {
  91. struct inode *inode = container_of(head, struct inode, i_rcu);
  92. kmem_cache_free(affs_inode_cachep, AFFS_I(inode));
  93. }
  94. static void affs_destroy_inode(struct inode *inode)
  95. {
  96. call_rcu(&inode->i_rcu, affs_i_callback);
  97. }
  98. static void init_once(void *foo)
  99. {
  100. struct affs_inode_info *ei = (struct affs_inode_info *) foo;
  101. sema_init(&ei->i_link_lock, 1);
  102. sema_init(&ei->i_ext_lock, 1);
  103. inode_init_once(&ei->vfs_inode);
  104. }
  105. static int __init init_inodecache(void)
  106. {
  107. affs_inode_cachep = kmem_cache_create("affs_inode_cache",
  108. sizeof(struct affs_inode_info),
  109. 0, (SLAB_RECLAIM_ACCOUNT|
  110. SLAB_MEM_SPREAD),
  111. init_once);
  112. if (affs_inode_cachep == NULL)
  113. return -ENOMEM;
  114. return 0;
  115. }
  116. static void destroy_inodecache(void)
  117. {
  118. /*
  119. * Make sure all delayed rcu free inodes are flushed before we
  120. * destroy cache.
  121. */
  122. rcu_barrier();
  123. kmem_cache_destroy(affs_inode_cachep);
  124. }
  125. static const struct super_operations affs_sops = {
  126. .alloc_inode = affs_alloc_inode,
  127. .destroy_inode = affs_destroy_inode,
  128. .write_inode = affs_write_inode,
  129. .evict_inode = affs_evict_inode,
  130. .put_super = affs_put_super,
  131. .sync_fs = affs_sync_fs,
  132. .statfs = affs_statfs,
  133. .remount_fs = affs_remount,
  134. .show_options = generic_show_options,
  135. };
  136. enum {
  137. Opt_bs, Opt_mode, Opt_mufs, Opt_notruncate, Opt_prefix, Opt_protect,
  138. Opt_reserved, Opt_root, Opt_setgid, Opt_setuid,
  139. Opt_verbose, Opt_volume, Opt_ignore, Opt_err,
  140. };
  141. static const match_table_t tokens = {
  142. {Opt_bs, "bs=%u"},
  143. {Opt_mode, "mode=%o"},
  144. {Opt_mufs, "mufs"},
  145. {Opt_notruncate, "nofilenametruncate"},
  146. {Opt_prefix, "prefix=%s"},
  147. {Opt_protect, "protect"},
  148. {Opt_reserved, "reserved=%u"},
  149. {Opt_root, "root=%u"},
  150. {Opt_setgid, "setgid=%u"},
  151. {Opt_setuid, "setuid=%u"},
  152. {Opt_verbose, "verbose"},
  153. {Opt_volume, "volume=%s"},
  154. {Opt_ignore, "grpquota"},
  155. {Opt_ignore, "noquota"},
  156. {Opt_ignore, "quota"},
  157. {Opt_ignore, "usrquota"},
  158. {Opt_err, NULL},
  159. };
  160. static int
  161. parse_options(char *options, kuid_t *uid, kgid_t *gid, int *mode, int *reserved, s32 *root,
  162. int *blocksize, char **prefix, char *volume, unsigned long *mount_opts)
  163. {
  164. char *p;
  165. substring_t args[MAX_OPT_ARGS];
  166. /* Fill in defaults */
  167. *uid = current_uid();
  168. *gid = current_gid();
  169. *reserved = 2;
  170. *root = -1;
  171. *blocksize = -1;
  172. volume[0] = ':';
  173. volume[1] = 0;
  174. *mount_opts = 0;
  175. if (!options)
  176. return 1;
  177. while ((p = strsep(&options, ",")) != NULL) {
  178. int token, n, option;
  179. if (!*p)
  180. continue;
  181. token = match_token(p, tokens, args);
  182. switch (token) {
  183. case Opt_bs:
  184. if (match_int(&args[0], &n))
  185. return 0;
  186. if (n != 512 && n != 1024 && n != 2048
  187. && n != 4096) {
  188. pr_warn("Invalid blocksize (512, 1024, 2048, 4096 allowed)\n");
  189. return 0;
  190. }
  191. *blocksize = n;
  192. break;
  193. case Opt_mode:
  194. if (match_octal(&args[0], &option))
  195. return 0;
  196. *mode = option & 0777;
  197. affs_set_opt(*mount_opts, SF_SETMODE);
  198. break;
  199. case Opt_mufs:
  200. affs_set_opt(*mount_opts, SF_MUFS);
  201. break;
  202. case Opt_notruncate:
  203. affs_set_opt(*mount_opts, SF_NO_TRUNCATE);
  204. break;
  205. case Opt_prefix:
  206. *prefix = match_strdup(&args[0]);
  207. if (!*prefix)
  208. return 0;
  209. affs_set_opt(*mount_opts, SF_PREFIX);
  210. break;
  211. case Opt_protect:
  212. affs_set_opt(*mount_opts, SF_IMMUTABLE);
  213. break;
  214. case Opt_reserved:
  215. if (match_int(&args[0], reserved))
  216. return 0;
  217. break;
  218. case Opt_root:
  219. if (match_int(&args[0], root))
  220. return 0;
  221. break;
  222. case Opt_setgid:
  223. if (match_int(&args[0], &option))
  224. return 0;
  225. *gid = make_kgid(current_user_ns(), option);
  226. if (!gid_valid(*gid))
  227. return 0;
  228. affs_set_opt(*mount_opts, SF_SETGID);
  229. break;
  230. case Opt_setuid:
  231. if (match_int(&args[0], &option))
  232. return 0;
  233. *uid = make_kuid(current_user_ns(), option);
  234. if (!uid_valid(*uid))
  235. return 0;
  236. affs_set_opt(*mount_opts, SF_SETUID);
  237. break;
  238. case Opt_verbose:
  239. affs_set_opt(*mount_opts, SF_VERBOSE);
  240. break;
  241. case Opt_volume: {
  242. char *vol = match_strdup(&args[0]);
  243. if (!vol)
  244. return 0;
  245. strlcpy(volume, vol, 32);
  246. kfree(vol);
  247. break;
  248. }
  249. case Opt_ignore:
  250. /* Silently ignore the quota options */
  251. break;
  252. default:
  253. pr_warn("Unrecognized mount option \"%s\" or missing value\n",
  254. p);
  255. return 0;
  256. }
  257. }
  258. return 1;
  259. }
  260. /* This function definitely needs to be split up. Some fine day I'll
  261. * hopefully have the guts to do so. Until then: sorry for the mess.
  262. */
  263. static int affs_fill_super(struct super_block *sb, void *data, int silent)
  264. {
  265. struct affs_sb_info *sbi;
  266. struct buffer_head *root_bh = NULL;
  267. struct buffer_head *boot_bh;
  268. struct inode *root_inode = NULL;
  269. s32 root_block;
  270. int size, blocksize;
  271. u32 chksum;
  272. int num_bm;
  273. int i, j;
  274. kuid_t uid;
  275. kgid_t gid;
  276. int reserved;
  277. unsigned long mount_flags;
  278. int tmp_flags; /* fix remount prototype... */
  279. u8 sig[4];
  280. int ret;
  281. save_mount_options(sb, data);
  282. pr_debug("read_super(%s)\n", data ? (const char *)data : "no options");
  283. sb->s_magic = AFFS_SUPER_MAGIC;
  284. sb->s_op = &affs_sops;
  285. sb->s_flags |= MS_NODIRATIME;
  286. sbi = kzalloc(sizeof(struct affs_sb_info), GFP_KERNEL);
  287. if (!sbi)
  288. return -ENOMEM;
  289. sb->s_fs_info = sbi;
  290. sbi->sb = sb;
  291. mutex_init(&sbi->s_bmlock);
  292. spin_lock_init(&sbi->symlink_lock);
  293. spin_lock_init(&sbi->work_lock);
  294. INIT_DELAYED_WORK(&sbi->sb_work, flush_superblock);
  295. if (!parse_options(data,&uid,&gid,&i,&reserved,&root_block,
  296. &blocksize,&sbi->s_prefix,
  297. sbi->s_volume, &mount_flags)) {
  298. pr_err("Error parsing options\n");
  299. return -EINVAL;
  300. }
  301. /* N.B. after this point s_prefix must be released */
  302. sbi->s_flags = mount_flags;
  303. sbi->s_mode = i;
  304. sbi->s_uid = uid;
  305. sbi->s_gid = gid;
  306. sbi->s_reserved= reserved;
  307. /* Get the size of the device in 512-byte blocks.
  308. * If we later see that the partition uses bigger
  309. * blocks, we will have to change it.
  310. */
  311. size = i_size_read(sb->s_bdev->bd_inode) >> 9;
  312. pr_debug("initial blocksize=%d, #blocks=%d\n", 512, size);
  313. affs_set_blocksize(sb, PAGE_SIZE);
  314. /* Try to find root block. Its location depends on the block size. */
  315. i = bdev_logical_block_size(sb->s_bdev);
  316. j = PAGE_SIZE;
  317. if (blocksize > 0) {
  318. i = j = blocksize;
  319. size = size / (blocksize / 512);
  320. }
  321. for (blocksize = i; blocksize <= j; blocksize <<= 1, size >>= 1) {
  322. sbi->s_root_block = root_block;
  323. if (root_block < 0)
  324. sbi->s_root_block = (reserved + size - 1) / 2;
  325. pr_debug("setting blocksize to %d\n", blocksize);
  326. affs_set_blocksize(sb, blocksize);
  327. sbi->s_partition_size = size;
  328. /* The root block location that was calculated above is not
  329. * correct if the partition size is an odd number of 512-
  330. * byte blocks, which will be rounded down to a number of
  331. * 1024-byte blocks, and if there were an even number of
  332. * reserved blocks. Ideally, all partition checkers should
  333. * report the real number of blocks of the real blocksize,
  334. * but since this just cannot be done, we have to try to
  335. * find the root block anyways. In the above case, it is one
  336. * block behind the calculated one. So we check this one, too.
  337. */
  338. for (num_bm = 0; num_bm < 2; num_bm++) {
  339. pr_debug("Dev %s, trying root=%u, bs=%d, "
  340. "size=%d, reserved=%d\n",
  341. sb->s_id,
  342. sbi->s_root_block + num_bm,
  343. blocksize, size, reserved);
  344. root_bh = affs_bread(sb, sbi->s_root_block + num_bm);
  345. if (!root_bh)
  346. continue;
  347. if (!affs_checksum_block(sb, root_bh) &&
  348. be32_to_cpu(AFFS_ROOT_HEAD(root_bh)->ptype) == T_SHORT &&
  349. be32_to_cpu(AFFS_ROOT_TAIL(sb, root_bh)->stype) == ST_ROOT) {
  350. sbi->s_hashsize = blocksize / 4 - 56;
  351. sbi->s_root_block += num_bm;
  352. goto got_root;
  353. }
  354. affs_brelse(root_bh);
  355. root_bh = NULL;
  356. }
  357. }
  358. if (!silent)
  359. pr_err("No valid root block on device %s\n", sb->s_id);
  360. return -EINVAL;
  361. /* N.B. after this point bh must be released */
  362. got_root:
  363. /* Keep super block in cache */
  364. sbi->s_root_bh = root_bh;
  365. root_block = sbi->s_root_block;
  366. /* Find out which kind of FS we have */
  367. boot_bh = sb_bread(sb, 0);
  368. if (!boot_bh) {
  369. pr_err("Cannot read boot block\n");
  370. return -EINVAL;
  371. }
  372. memcpy(sig, boot_bh->b_data, 4);
  373. brelse(boot_bh);
  374. chksum = be32_to_cpu(*(__be32 *)sig);
  375. /* Dircache filesystems are compatible with non-dircache ones
  376. * when reading. As long as they aren't supported, writing is
  377. * not recommended.
  378. */
  379. if ((chksum == FS_DCFFS || chksum == MUFS_DCFFS || chksum == FS_DCOFS
  380. || chksum == MUFS_DCOFS) && !(sb->s_flags & MS_RDONLY)) {
  381. pr_notice("Dircache FS - mounting %s read only\n", sb->s_id);
  382. sb->s_flags |= MS_RDONLY;
  383. }
  384. switch (chksum) {
  385. case MUFS_FS:
  386. case MUFS_INTLFFS:
  387. case MUFS_DCFFS:
  388. affs_set_opt(sbi->s_flags, SF_MUFS);
  389. /* fall thru */
  390. case FS_INTLFFS:
  391. case FS_DCFFS:
  392. affs_set_opt(sbi->s_flags, SF_INTL);
  393. break;
  394. case MUFS_FFS:
  395. affs_set_opt(sbi->s_flags, SF_MUFS);
  396. break;
  397. case FS_FFS:
  398. break;
  399. case MUFS_OFS:
  400. affs_set_opt(sbi->s_flags, SF_MUFS);
  401. /* fall thru */
  402. case FS_OFS:
  403. affs_set_opt(sbi->s_flags, SF_OFS);
  404. sb->s_flags |= MS_NOEXEC;
  405. break;
  406. case MUFS_DCOFS:
  407. case MUFS_INTLOFS:
  408. affs_set_opt(sbi->s_flags, SF_MUFS);
  409. case FS_DCOFS:
  410. case FS_INTLOFS:
  411. affs_set_opt(sbi->s_flags, SF_INTL);
  412. affs_set_opt(sbi->s_flags, SF_OFS);
  413. sb->s_flags |= MS_NOEXEC;
  414. break;
  415. default:
  416. pr_err("Unknown filesystem on device %s: %08X\n",
  417. sb->s_id, chksum);
  418. return -EINVAL;
  419. }
  420. if (affs_test_opt(mount_flags, SF_VERBOSE)) {
  421. u8 len = AFFS_ROOT_TAIL(sb, root_bh)->disk_name[0];
  422. pr_notice("Mounting volume \"%.*s\": Type=%.3s\\%c, Blocksize=%d\n",
  423. len > 31 ? 31 : len,
  424. AFFS_ROOT_TAIL(sb, root_bh)->disk_name + 1,
  425. sig, sig[3] + '0', blocksize);
  426. }
  427. sb->s_flags |= MS_NODEV | MS_NOSUID;
  428. sbi->s_data_blksize = sb->s_blocksize;
  429. if (affs_test_opt(sbi->s_flags, SF_OFS))
  430. sbi->s_data_blksize -= 24;
  431. tmp_flags = sb->s_flags;
  432. ret = affs_init_bitmap(sb, &tmp_flags);
  433. if (ret)
  434. return ret;
  435. sb->s_flags = tmp_flags;
  436. /* set up enough so that it can read an inode */
  437. root_inode = affs_iget(sb, root_block);
  438. if (IS_ERR(root_inode))
  439. return PTR_ERR(root_inode);
  440. if (affs_test_opt(AFFS_SB(sb)->s_flags, SF_INTL))
  441. sb->s_d_op = &affs_intl_dentry_operations;
  442. else
  443. sb->s_d_op = &affs_dentry_operations;
  444. sb->s_root = d_make_root(root_inode);
  445. if (!sb->s_root) {
  446. pr_err("AFFS: Get root inode failed\n");
  447. return -ENOMEM;
  448. }
  449. pr_debug("s_flags=%lX\n", sb->s_flags);
  450. return 0;
  451. }
  452. static int
  453. affs_remount(struct super_block *sb, int *flags, char *data)
  454. {
  455. struct affs_sb_info *sbi = AFFS_SB(sb);
  456. int blocksize;
  457. kuid_t uid;
  458. kgid_t gid;
  459. int mode;
  460. int reserved;
  461. int root_block;
  462. unsigned long mount_flags;
  463. int res = 0;
  464. char *new_opts;
  465. char volume[32];
  466. char *prefix = NULL;
  467. new_opts = kstrdup(data, GFP_KERNEL);
  468. if (data && !new_opts)
  469. return -ENOMEM;
  470. pr_debug("%s(flags=0x%x,opts=\"%s\")\n", __func__, *flags, data);
  471. sync_filesystem(sb);
  472. *flags |= MS_NODIRATIME;
  473. memcpy(volume, sbi->s_volume, 32);
  474. if (!parse_options(data, &uid, &gid, &mode, &reserved, &root_block,
  475. &blocksize, &prefix, volume,
  476. &mount_flags)) {
  477. kfree(prefix);
  478. kfree(new_opts);
  479. return -EINVAL;
  480. }
  481. flush_delayed_work(&sbi->sb_work);
  482. if (new_opts)
  483. replace_mount_options(sb, new_opts);
  484. sbi->s_flags = mount_flags;
  485. sbi->s_mode = mode;
  486. sbi->s_uid = uid;
  487. sbi->s_gid = gid;
  488. /* protect against readers */
  489. spin_lock(&sbi->symlink_lock);
  490. if (prefix) {
  491. kfree(sbi->s_prefix);
  492. sbi->s_prefix = prefix;
  493. }
  494. memcpy(sbi->s_volume, volume, 32);
  495. spin_unlock(&sbi->symlink_lock);
  496. if ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY))
  497. return 0;
  498. if (*flags & MS_RDONLY)
  499. affs_free_bitmap(sb);
  500. else
  501. res = affs_init_bitmap(sb, flags);
  502. return res;
  503. }
  504. static int
  505. affs_statfs(struct dentry *dentry, struct kstatfs *buf)
  506. {
  507. struct super_block *sb = dentry->d_sb;
  508. int free;
  509. u64 id = huge_encode_dev(sb->s_bdev->bd_dev);
  510. pr_debug("%s() partsize=%d, reserved=%d\n",
  511. __func__, AFFS_SB(sb)->s_partition_size,
  512. AFFS_SB(sb)->s_reserved);
  513. free = affs_count_free_blocks(sb);
  514. buf->f_type = AFFS_SUPER_MAGIC;
  515. buf->f_bsize = sb->s_blocksize;
  516. buf->f_blocks = AFFS_SB(sb)->s_partition_size - AFFS_SB(sb)->s_reserved;
  517. buf->f_bfree = free;
  518. buf->f_bavail = free;
  519. buf->f_fsid.val[0] = (u32)id;
  520. buf->f_fsid.val[1] = (u32)(id >> 32);
  521. buf->f_namelen = AFFSNAMEMAX;
  522. return 0;
  523. }
  524. static struct dentry *affs_mount(struct file_system_type *fs_type,
  525. int flags, const char *dev_name, void *data)
  526. {
  527. return mount_bdev(fs_type, flags, dev_name, data, affs_fill_super);
  528. }
  529. static void affs_kill_sb(struct super_block *sb)
  530. {
  531. struct affs_sb_info *sbi = AFFS_SB(sb);
  532. kill_block_super(sb);
  533. if (sbi) {
  534. affs_free_bitmap(sb);
  535. affs_brelse(sbi->s_root_bh);
  536. kfree(sbi->s_prefix);
  537. mutex_destroy(&sbi->s_bmlock);
  538. kfree(sbi);
  539. }
  540. }
  541. static struct file_system_type affs_fs_type = {
  542. .owner = THIS_MODULE,
  543. .name = "affs",
  544. .mount = affs_mount,
  545. .kill_sb = affs_kill_sb,
  546. .fs_flags = FS_REQUIRES_DEV,
  547. };
  548. MODULE_ALIAS_FS("affs");
  549. static int __init init_affs_fs(void)
  550. {
  551. int err = init_inodecache();
  552. if (err)
  553. goto out1;
  554. err = register_filesystem(&affs_fs_type);
  555. if (err)
  556. goto out;
  557. return 0;
  558. out:
  559. destroy_inodecache();
  560. out1:
  561. return err;
  562. }
  563. static void __exit exit_affs_fs(void)
  564. {
  565. unregister_filesystem(&affs_fs_type);
  566. destroy_inodecache();
  567. }
  568. MODULE_DESCRIPTION("Amiga filesystem support for Linux");
  569. MODULE_LICENSE("GPL");
  570. module_init(init_affs_fs)
  571. module_exit(exit_affs_fs)