super.c 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541
  1. /*
  2. * linux/fs/hfsplus/super.c
  3. *
  4. * Copyright (C) 2001
  5. * Brad Boyer (flar@allandria.com)
  6. * (C) 2003 Ardis Technologies <roman@ardistech.com>
  7. *
  8. */
  9. #include <linux/module.h>
  10. #include <linux/init.h>
  11. #include <linux/pagemap.h>
  12. #include <linux/fs.h>
  13. #include <linux/slab.h>
  14. #include <linux/vfs.h>
  15. #include <linux/nls.h>
  16. static struct inode *hfsplus_alloc_inode(struct super_block *sb);
  17. static void hfsplus_destroy_inode(struct inode *inode);
  18. #include "hfsplus_fs.h"
  19. static int hfsplus_system_read_inode(struct inode *inode)
  20. {
  21. struct hfsplus_vh *vhdr = HFSPLUS_SB(inode->i_sb)->s_vhdr;
  22. switch (inode->i_ino) {
  23. case HFSPLUS_EXT_CNID:
  24. hfsplus_inode_read_fork(inode, &vhdr->ext_file);
  25. inode->i_mapping->a_ops = &hfsplus_btree_aops;
  26. break;
  27. case HFSPLUS_CAT_CNID:
  28. hfsplus_inode_read_fork(inode, &vhdr->cat_file);
  29. inode->i_mapping->a_ops = &hfsplus_btree_aops;
  30. break;
  31. case HFSPLUS_ALLOC_CNID:
  32. hfsplus_inode_read_fork(inode, &vhdr->alloc_file);
  33. inode->i_mapping->a_ops = &hfsplus_aops;
  34. break;
  35. case HFSPLUS_START_CNID:
  36. hfsplus_inode_read_fork(inode, &vhdr->start_file);
  37. break;
  38. case HFSPLUS_ATTR_CNID:
  39. hfsplus_inode_read_fork(inode, &vhdr->attr_file);
  40. inode->i_mapping->a_ops = &hfsplus_btree_aops;
  41. break;
  42. default:
  43. return -EIO;
  44. }
  45. return 0;
  46. }
  47. struct inode *hfsplus_iget(struct super_block *sb, unsigned long ino)
  48. {
  49. struct hfs_find_data fd;
  50. struct inode *inode;
  51. int err;
  52. inode = iget_locked(sb, ino);
  53. if (!inode)
  54. return ERR_PTR(-ENOMEM);
  55. if (!(inode->i_state & I_NEW))
  56. return inode;
  57. INIT_LIST_HEAD(&HFSPLUS_I(inode)->open_dir_list);
  58. mutex_init(&HFSPLUS_I(inode)->extents_lock);
  59. HFSPLUS_I(inode)->flags = 0;
  60. HFSPLUS_I(inode)->rsrc_inode = NULL;
  61. atomic_set(&HFSPLUS_I(inode)->opencnt, 0);
  62. if (inode->i_ino >= HFSPLUS_FIRSTUSER_CNID ||
  63. inode->i_ino == HFSPLUS_ROOT_CNID) {
  64. hfs_find_init(HFSPLUS_SB(inode->i_sb)->cat_tree, &fd);
  65. err = hfsplus_find_cat(inode->i_sb, inode->i_ino, &fd);
  66. if (!err)
  67. err = hfsplus_cat_read_inode(inode, &fd);
  68. hfs_find_exit(&fd);
  69. } else {
  70. err = hfsplus_system_read_inode(inode);
  71. }
  72. if (err) {
  73. iget_failed(inode);
  74. return ERR_PTR(err);
  75. }
  76. unlock_new_inode(inode);
  77. return inode;
  78. }
  79. static int hfsplus_system_write_inode(struct inode *inode)
  80. {
  81. struct hfsplus_sb_info *sbi = HFSPLUS_SB(inode->i_sb);
  82. struct hfsplus_vh *vhdr = sbi->s_vhdr;
  83. struct hfsplus_fork_raw *fork;
  84. struct hfs_btree *tree = NULL;
  85. switch (inode->i_ino) {
  86. case HFSPLUS_EXT_CNID:
  87. fork = &vhdr->ext_file;
  88. tree = sbi->ext_tree;
  89. break;
  90. case HFSPLUS_CAT_CNID:
  91. fork = &vhdr->cat_file;
  92. tree = sbi->cat_tree;
  93. break;
  94. case HFSPLUS_ALLOC_CNID:
  95. fork = &vhdr->alloc_file;
  96. break;
  97. case HFSPLUS_START_CNID:
  98. fork = &vhdr->start_file;
  99. break;
  100. case HFSPLUS_ATTR_CNID:
  101. fork = &vhdr->attr_file;
  102. tree = sbi->attr_tree;
  103. default:
  104. return -EIO;
  105. }
  106. if (fork->total_size != cpu_to_be64(inode->i_size)) {
  107. set_bit(HFSPLUS_SB_WRITEBACKUP, &sbi->flags);
  108. inode->i_sb->s_dirt = 1;
  109. }
  110. hfsplus_inode_write_fork(inode, fork);
  111. if (tree)
  112. hfs_btree_write(tree);
  113. return 0;
  114. }
  115. static int hfsplus_write_inode(struct inode *inode,
  116. struct writeback_control *wbc)
  117. {
  118. dprint(DBG_INODE, "hfsplus_write_inode: %lu\n", inode->i_ino);
  119. hfsplus_ext_write_extent(inode);
  120. if (inode->i_ino >= HFSPLUS_FIRSTUSER_CNID ||
  121. inode->i_ino == HFSPLUS_ROOT_CNID)
  122. return hfsplus_cat_write_inode(inode);
  123. else
  124. return hfsplus_system_write_inode(inode);
  125. }
  126. static void hfsplus_evict_inode(struct inode *inode)
  127. {
  128. dprint(DBG_INODE, "hfsplus_evict_inode: %lu\n", inode->i_ino);
  129. truncate_inode_pages(&inode->i_data, 0);
  130. end_writeback(inode);
  131. if (HFSPLUS_IS_RSRC(inode)) {
  132. HFSPLUS_I(HFSPLUS_I(inode)->rsrc_inode)->rsrc_inode = NULL;
  133. iput(HFSPLUS_I(inode)->rsrc_inode);
  134. }
  135. }
  136. int hfsplus_sync_fs(struct super_block *sb, int wait)
  137. {
  138. struct hfsplus_sb_info *sbi = HFSPLUS_SB(sb);
  139. struct hfsplus_vh *vhdr = sbi->s_vhdr;
  140. dprint(DBG_SUPER, "hfsplus_write_super\n");
  141. mutex_lock(&sbi->vh_mutex);
  142. mutex_lock(&sbi->alloc_mutex);
  143. sb->s_dirt = 0;
  144. vhdr->free_blocks = cpu_to_be32(sbi->free_blocks);
  145. vhdr->next_cnid = cpu_to_be32(sbi->next_cnid);
  146. vhdr->folder_count = cpu_to_be32(sbi->folder_count);
  147. vhdr->file_count = cpu_to_be32(sbi->file_count);
  148. mark_buffer_dirty(sbi->s_vhbh);
  149. if (test_and_clear_bit(HFSPLUS_SB_WRITEBACKUP, &sbi->flags)) {
  150. if (sbi->sect_count) {
  151. struct buffer_head *bh;
  152. u32 block, offset;
  153. block = sbi->blockoffset;
  154. block += (sbi->sect_count - 2) >> (sb->s_blocksize_bits - 9);
  155. offset = ((sbi->sect_count - 2) << 9) & (sb->s_blocksize - 1);
  156. printk(KERN_DEBUG "hfs: backup: %u,%u,%u,%u\n",
  157. sbi->blockoffset, sbi->sect_count,
  158. block, offset);
  159. bh = sb_bread(sb, block);
  160. if (bh) {
  161. vhdr = (struct hfsplus_vh *)(bh->b_data + offset);
  162. if (be16_to_cpu(vhdr->signature) == HFSPLUS_VOLHEAD_SIG) {
  163. memcpy(vhdr, sbi->s_vhdr, sizeof(*vhdr));
  164. mark_buffer_dirty(bh);
  165. brelse(bh);
  166. } else
  167. printk(KERN_WARNING "hfs: backup not found!\n");
  168. }
  169. }
  170. }
  171. mutex_unlock(&sbi->alloc_mutex);
  172. mutex_unlock(&sbi->vh_mutex);
  173. return 0;
  174. }
  175. static void hfsplus_write_super(struct super_block *sb)
  176. {
  177. if (!(sb->s_flags & MS_RDONLY))
  178. hfsplus_sync_fs(sb, 1);
  179. else
  180. sb->s_dirt = 0;
  181. }
  182. static void hfsplus_put_super(struct super_block *sb)
  183. {
  184. struct hfsplus_sb_info *sbi = HFSPLUS_SB(sb);
  185. dprint(DBG_SUPER, "hfsplus_put_super\n");
  186. if (!sb->s_fs_info)
  187. return;
  188. if (sb->s_dirt)
  189. hfsplus_write_super(sb);
  190. if (!(sb->s_flags & MS_RDONLY) && sbi->s_vhdr) {
  191. struct hfsplus_vh *vhdr = sbi->s_vhdr;
  192. vhdr->modify_date = hfsp_now2mt();
  193. vhdr->attributes |= cpu_to_be32(HFSPLUS_VOL_UNMNT);
  194. vhdr->attributes &= cpu_to_be32(~HFSPLUS_VOL_INCNSTNT);
  195. mark_buffer_dirty(sbi->s_vhbh);
  196. sync_dirty_buffer(sbi->s_vhbh);
  197. }
  198. hfs_btree_close(sbi->cat_tree);
  199. hfs_btree_close(sbi->ext_tree);
  200. iput(sbi->alloc_file);
  201. iput(sbi->hidden_dir);
  202. brelse(sbi->s_vhbh);
  203. unload_nls(sbi->nls);
  204. kfree(sb->s_fs_info);
  205. sb->s_fs_info = NULL;
  206. }
  207. static int hfsplus_statfs(struct dentry *dentry, struct kstatfs *buf)
  208. {
  209. struct super_block *sb = dentry->d_sb;
  210. struct hfsplus_sb_info *sbi = HFSPLUS_SB(sb);
  211. u64 id = huge_encode_dev(sb->s_bdev->bd_dev);
  212. buf->f_type = HFSPLUS_SUPER_MAGIC;
  213. buf->f_bsize = sb->s_blocksize;
  214. buf->f_blocks = sbi->total_blocks << sbi->fs_shift;
  215. buf->f_bfree = sbi->free_blocks << sbi->fs_shift;
  216. buf->f_bavail = buf->f_bfree;
  217. buf->f_files = 0xFFFFFFFF;
  218. buf->f_ffree = 0xFFFFFFFF - sbi->next_cnid;
  219. buf->f_fsid.val[0] = (u32)id;
  220. buf->f_fsid.val[1] = (u32)(id >> 32);
  221. buf->f_namelen = HFSPLUS_MAX_STRLEN;
  222. return 0;
  223. }
  224. static int hfsplus_remount(struct super_block *sb, int *flags, char *data)
  225. {
  226. if ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY))
  227. return 0;
  228. if (!(*flags & MS_RDONLY)) {
  229. struct hfsplus_vh *vhdr = HFSPLUS_SB(sb)->s_vhdr;
  230. struct hfsplus_sb_info sbi;
  231. memset(&sbi, 0, sizeof(struct hfsplus_sb_info));
  232. sbi.nls = HFSPLUS_SB(sb)->nls;
  233. if (!hfsplus_parse_options(data, &sbi))
  234. return -EINVAL;
  235. if (!(vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_UNMNT))) {
  236. printk(KERN_WARNING "hfs: filesystem was not cleanly unmounted, "
  237. "running fsck.hfsplus is recommended. leaving read-only.\n");
  238. sb->s_flags |= MS_RDONLY;
  239. *flags |= MS_RDONLY;
  240. } else if (test_bit(HFSPLUS_SB_FORCE, &sbi.flags)) {
  241. /* nothing */
  242. } else if (vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_SOFTLOCK)) {
  243. printk(KERN_WARNING "hfs: filesystem is marked locked, leaving read-only.\n");
  244. sb->s_flags |= MS_RDONLY;
  245. *flags |= MS_RDONLY;
  246. } else if (vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_JOURNALED)) {
  247. printk(KERN_WARNING "hfs: filesystem is marked journaled, leaving read-only.\n");
  248. sb->s_flags |= MS_RDONLY;
  249. *flags |= MS_RDONLY;
  250. }
  251. }
  252. return 0;
  253. }
  254. static const struct super_operations hfsplus_sops = {
  255. .alloc_inode = hfsplus_alloc_inode,
  256. .destroy_inode = hfsplus_destroy_inode,
  257. .write_inode = hfsplus_write_inode,
  258. .evict_inode = hfsplus_evict_inode,
  259. .put_super = hfsplus_put_super,
  260. .write_super = hfsplus_write_super,
  261. .sync_fs = hfsplus_sync_fs,
  262. .statfs = hfsplus_statfs,
  263. .remount_fs = hfsplus_remount,
  264. .show_options = hfsplus_show_options,
  265. };
  266. static int hfsplus_fill_super(struct super_block *sb, void *data, int silent)
  267. {
  268. struct hfsplus_vh *vhdr;
  269. struct hfsplus_sb_info *sbi;
  270. hfsplus_cat_entry entry;
  271. struct hfs_find_data fd;
  272. struct inode *root, *inode;
  273. struct qstr str;
  274. struct nls_table *nls = NULL;
  275. int err = -EINVAL;
  276. sbi = kzalloc(sizeof(*sbi), GFP_KERNEL);
  277. if (!sbi)
  278. return -ENOMEM;
  279. sb->s_fs_info = sbi;
  280. mutex_init(&sbi->alloc_mutex);
  281. mutex_init(&sbi->vh_mutex);
  282. hfsplus_fill_defaults(sbi);
  283. if (!hfsplus_parse_options(data, sbi)) {
  284. printk(KERN_ERR "hfs: unable to parse mount options\n");
  285. err = -EINVAL;
  286. goto cleanup;
  287. }
  288. /* temporarily use utf8 to correctly find the hidden dir below */
  289. nls = sbi->nls;
  290. sbi->nls = load_nls("utf8");
  291. if (!sbi->nls) {
  292. printk(KERN_ERR "hfs: unable to load nls for utf8\n");
  293. err = -EINVAL;
  294. goto cleanup;
  295. }
  296. /* Grab the volume header */
  297. if (hfsplus_read_wrapper(sb)) {
  298. if (!silent)
  299. printk(KERN_WARNING "hfs: unable to find HFS+ superblock\n");
  300. err = -EINVAL;
  301. goto cleanup;
  302. }
  303. vhdr = sbi->s_vhdr;
  304. /* Copy parts of the volume header into the superblock */
  305. sb->s_magic = HFSPLUS_VOLHEAD_SIG;
  306. if (be16_to_cpu(vhdr->version) < HFSPLUS_MIN_VERSION ||
  307. be16_to_cpu(vhdr->version) > HFSPLUS_CURRENT_VERSION) {
  308. printk(KERN_ERR "hfs: wrong filesystem version\n");
  309. goto cleanup;
  310. }
  311. sbi->total_blocks = be32_to_cpu(vhdr->total_blocks);
  312. sbi->free_blocks = be32_to_cpu(vhdr->free_blocks);
  313. sbi->next_cnid = be32_to_cpu(vhdr->next_cnid);
  314. sbi->file_count = be32_to_cpu(vhdr->file_count);
  315. sbi->folder_count = be32_to_cpu(vhdr->folder_count);
  316. sbi->data_clump_blocks =
  317. be32_to_cpu(vhdr->data_clump_sz) >> sbi->alloc_blksz_shift;
  318. if (!sbi->data_clump_blocks)
  319. sbi->data_clump_blocks = 1;
  320. sbi->rsrc_clump_blocks =
  321. be32_to_cpu(vhdr->rsrc_clump_sz) >> sbi->alloc_blksz_shift;
  322. if (!sbi->rsrc_clump_blocks)
  323. sbi->rsrc_clump_blocks = 1;
  324. /* Set up operations so we can load metadata */
  325. sb->s_op = &hfsplus_sops;
  326. sb->s_maxbytes = MAX_LFS_FILESIZE;
  327. if (!(vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_UNMNT))) {
  328. printk(KERN_WARNING "hfs: Filesystem was not cleanly unmounted, "
  329. "running fsck.hfsplus is recommended. mounting read-only.\n");
  330. sb->s_flags |= MS_RDONLY;
  331. } else if (test_and_clear_bit(HFSPLUS_SB_FORCE, &sbi->flags)) {
  332. /* nothing */
  333. } else if (vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_SOFTLOCK)) {
  334. printk(KERN_WARNING "hfs: Filesystem is marked locked, mounting read-only.\n");
  335. sb->s_flags |= MS_RDONLY;
  336. } else if ((vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_JOURNALED)) && !(sb->s_flags & MS_RDONLY)) {
  337. printk(KERN_WARNING "hfs: write access to a journaled filesystem is not supported, "
  338. "use the force option at your own risk, mounting read-only.\n");
  339. sb->s_flags |= MS_RDONLY;
  340. }
  341. /* Load metadata objects (B*Trees) */
  342. sbi->ext_tree = hfs_btree_open(sb, HFSPLUS_EXT_CNID);
  343. if (!sbi->ext_tree) {
  344. printk(KERN_ERR "hfs: failed to load extents file\n");
  345. goto cleanup;
  346. }
  347. sbi->cat_tree = hfs_btree_open(sb, HFSPLUS_CAT_CNID);
  348. if (!sbi->cat_tree) {
  349. printk(KERN_ERR "hfs: failed to load catalog file\n");
  350. goto cleanup;
  351. }
  352. inode = hfsplus_iget(sb, HFSPLUS_ALLOC_CNID);
  353. if (IS_ERR(inode)) {
  354. printk(KERN_ERR "hfs: failed to load allocation file\n");
  355. err = PTR_ERR(inode);
  356. goto cleanup;
  357. }
  358. sbi->alloc_file = inode;
  359. /* Load the root directory */
  360. root = hfsplus_iget(sb, HFSPLUS_ROOT_CNID);
  361. if (IS_ERR(root)) {
  362. printk(KERN_ERR "hfs: failed to load root directory\n");
  363. err = PTR_ERR(root);
  364. goto cleanup;
  365. }
  366. sb->s_root = d_alloc_root(root);
  367. if (!sb->s_root) {
  368. iput(root);
  369. err = -ENOMEM;
  370. goto cleanup;
  371. }
  372. sb->s_root->d_op = &hfsplus_dentry_operations;
  373. str.len = sizeof(HFSP_HIDDENDIR_NAME) - 1;
  374. str.name = HFSP_HIDDENDIR_NAME;
  375. hfs_find_init(sbi->cat_tree, &fd);
  376. hfsplus_cat_build_key(sb, fd.search_key, HFSPLUS_ROOT_CNID, &str);
  377. if (!hfs_brec_read(&fd, &entry, sizeof(entry))) {
  378. hfs_find_exit(&fd);
  379. if (entry.type != cpu_to_be16(HFSPLUS_FOLDER))
  380. goto cleanup;
  381. inode = hfsplus_iget(sb, be32_to_cpu(entry.folder.id));
  382. if (IS_ERR(inode)) {
  383. err = PTR_ERR(inode);
  384. goto cleanup;
  385. }
  386. sbi->hidden_dir = inode;
  387. } else
  388. hfs_find_exit(&fd);
  389. if (sb->s_flags & MS_RDONLY)
  390. goto out;
  391. /* H+LX == hfsplusutils, H+Lx == this driver, H+lx is unused
  392. * all three are registered with Apple for our use
  393. */
  394. vhdr->last_mount_vers = cpu_to_be32(HFSP_MOUNT_VERSION);
  395. vhdr->modify_date = hfsp_now2mt();
  396. be32_add_cpu(&vhdr->write_count, 1);
  397. vhdr->attributes &= cpu_to_be32(~HFSPLUS_VOL_UNMNT);
  398. vhdr->attributes |= cpu_to_be32(HFSPLUS_VOL_INCNSTNT);
  399. mark_buffer_dirty(sbi->s_vhbh);
  400. sync_dirty_buffer(sbi->s_vhbh);
  401. if (!sbi->hidden_dir) {
  402. printk(KERN_DEBUG "hfs: create hidden dir...\n");
  403. mutex_lock(&sbi->vh_mutex);
  404. sbi->hidden_dir = hfsplus_new_inode(sb, S_IFDIR);
  405. hfsplus_create_cat(sbi->hidden_dir->i_ino, sb->s_root->d_inode,
  406. &str, sbi->hidden_dir);
  407. mutex_unlock(&sbi->vh_mutex);
  408. mark_inode_dirty(sbi->hidden_dir);
  409. }
  410. out:
  411. unload_nls(sbi->nls);
  412. sbi->nls = nls;
  413. return 0;
  414. cleanup:
  415. hfsplus_put_super(sb);
  416. unload_nls(nls);
  417. return err;
  418. }
  419. MODULE_AUTHOR("Brad Boyer");
  420. MODULE_DESCRIPTION("Extended Macintosh Filesystem");
  421. MODULE_LICENSE("GPL");
  422. static struct kmem_cache *hfsplus_inode_cachep;
  423. static struct inode *hfsplus_alloc_inode(struct super_block *sb)
  424. {
  425. struct hfsplus_inode_info *i;
  426. i = kmem_cache_alloc(hfsplus_inode_cachep, GFP_KERNEL);
  427. return i ? &i->vfs_inode : NULL;
  428. }
  429. static void hfsplus_destroy_inode(struct inode *inode)
  430. {
  431. kmem_cache_free(hfsplus_inode_cachep, HFSPLUS_I(inode));
  432. }
  433. #define HFSPLUS_INODE_SIZE sizeof(struct hfsplus_inode_info)
  434. static struct dentry *hfsplus_mount(struct file_system_type *fs_type,
  435. int flags, const char *dev_name, void *data)
  436. {
  437. return mount_bdev(fs_type, flags, dev_name, data, hfsplus_fill_super);
  438. }
  439. static struct file_system_type hfsplus_fs_type = {
  440. .owner = THIS_MODULE,
  441. .name = "hfsplus",
  442. .mount = hfsplus_mount,
  443. .kill_sb = kill_block_super,
  444. .fs_flags = FS_REQUIRES_DEV,
  445. };
  446. static void hfsplus_init_once(void *p)
  447. {
  448. struct hfsplus_inode_info *i = p;
  449. inode_init_once(&i->vfs_inode);
  450. }
  451. static int __init init_hfsplus_fs(void)
  452. {
  453. int err;
  454. hfsplus_inode_cachep = kmem_cache_create("hfsplus_icache",
  455. HFSPLUS_INODE_SIZE, 0, SLAB_HWCACHE_ALIGN,
  456. hfsplus_init_once);
  457. if (!hfsplus_inode_cachep)
  458. return -ENOMEM;
  459. err = register_filesystem(&hfsplus_fs_type);
  460. if (err)
  461. kmem_cache_destroy(hfsplus_inode_cachep);
  462. return err;
  463. }
  464. static void __exit exit_hfsplus_fs(void)
  465. {
  466. unregister_filesystem(&hfsplus_fs_type);
  467. kmem_cache_destroy(hfsplus_inode_cachep);
  468. }
  469. module_init(init_hfsplus_fs)
  470. module_exit(exit_hfsplus_fs)