patch-2_6_7-vs1_9_1_12
[linux-2.6.git] / fs / jfs / super.c
1 /*
2  *   Copyright (C) International Business Machines Corp., 2000-2004
3  *   Portions Copyright (C) Christoph Hellwig, 2001-2002
4  *
5  *   This program is free software;  you can redistribute it and/or modify
6  *   it under the terms of the GNU General Public License as published by
7  *   the Free Software Foundation; either version 2 of the License, or 
8  *   (at your option) any later version.
9  * 
10  *   This program is distributed in the hope that it will be useful,
11  *   but WITHOUT ANY WARRANTY;  without even the implied warranty of
12  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
13  *   the GNU General Public License for more details.
14  *
15  *   You should have received a copy of the GNU General Public License
16  *   along with this program;  if not, write to the Free Software 
17  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  */
19
20 #include <linux/fs.h>
21 #include <linux/config.h>
22 #include <linux/module.h>
23 #include <linux/parser.h>
24 #include <linux/completion.h>
25 #include <linux/vfs.h>
26 #include <linux/moduleparam.h>
27 #include <asm/uaccess.h>
28
29 #include "jfs_incore.h"
30 #include "jfs_filsys.h"
31 #include "jfs_metapage.h"
32 #include "jfs_superblock.h"
33 #include "jfs_dmap.h"
34 #include "jfs_imap.h"
35 #include "jfs_acl.h"
36 #include "jfs_debug.h"
37
38 MODULE_DESCRIPTION("The Journaled Filesystem (JFS)");
39 MODULE_AUTHOR("Steve Best/Dave Kleikamp/Barry Arndt, IBM");
40 MODULE_LICENSE("GPL");
41
42 static kmem_cache_t * jfs_inode_cachep;
43
44 static struct super_operations jfs_super_operations;
45 static struct export_operations jfs_export_operations;
46 static struct file_system_type jfs_fs_type;
47
48 #define MAX_COMMIT_THREADS 64
49 static int commit_threads = 0;
50 module_param(commit_threads, int, 0);
51 MODULE_PARM_DESC(commit_threads, "Number of commit threads");
52
53 int jfs_stop_threads;
54 static pid_t jfsIOthread;
55 static pid_t jfsCommitThread[MAX_COMMIT_THREADS];
56 static pid_t jfsSyncThread;
57 DECLARE_COMPLETION(jfsIOwait);
58
59 #ifdef CONFIG_JFS_DEBUG
60 int jfsloglevel = JFS_LOGLEVEL_WARN;
61 module_param(jfsloglevel, int, 644);
62 MODULE_PARM_DESC(jfsloglevel, "Specify JFS loglevel (0, 1 or 2)");
63 #endif
64
65 /*
66  * External declarations
67  */
68 extern int jfs_mount(struct super_block *);
69 extern int jfs_mount_rw(struct super_block *, int);
70 extern int jfs_umount(struct super_block *);
71 extern int jfs_umount_rw(struct super_block *);
72
73 extern int jfsIOWait(void *);
74 extern int jfs_lazycommit(void *);
75 extern int jfs_sync(void *);
76
77 extern void jfs_read_inode(struct inode *inode);
78 extern void jfs_dirty_inode(struct inode *inode);
79 extern void jfs_delete_inode(struct inode *inode);
80 extern void jfs_write_inode(struct inode *inode, int wait);
81
82 extern struct dentry *jfs_get_parent(struct dentry *dentry);
83 extern int jfs_extendfs(struct super_block *, s64, int);
84
85 #ifdef PROC_FS_JFS              /* see jfs_debug.h */
86 extern void jfs_proc_init(void);
87 extern void jfs_proc_clean(void);
88 #endif
89
90 extern wait_queue_head_t jfs_IO_thread_wait;
91 extern wait_queue_head_t jfs_commit_thread_wait;
92 extern wait_queue_head_t jfs_sync_thread_wait;
93
94 static void jfs_handle_error(struct super_block *sb)
95 {
96         struct jfs_sb_info *sbi = JFS_SBI(sb);
97
98         if (sb->s_flags & MS_RDONLY)
99                 return;
100
101         updateSuper(sb, FM_DIRTY);
102
103         if (sbi->flag & JFS_ERR_PANIC)
104                 panic("JFS (device %s): panic forced after error\n",
105                         sb->s_id);
106         else if (sbi->flag & JFS_ERR_REMOUNT_RO) {
107                 jfs_err("ERROR: (device %s): remounting filesystem "
108                         "as read-only\n",
109                         sb->s_id);
110                 sb->s_flags |= MS_RDONLY;
111         } 
112
113         /* nothing is done for continue beyond marking the superblock dirty */
114 }
115
116 void jfs_error(struct super_block *sb, const char * function, ...)
117 {
118         static char error_buf[256];
119         va_list args;
120
121         va_start(args, function);
122         vsprintf(error_buf, function, args);
123         va_end(args);
124
125         printk(KERN_ERR "ERROR: (device %s): %s\n", sb->s_id, error_buf);
126
127         jfs_handle_error(sb);
128 }
129
130 static struct inode *jfs_alloc_inode(struct super_block *sb)
131 {
132         struct jfs_inode_info *jfs_inode;
133
134         jfs_inode = kmem_cache_alloc(jfs_inode_cachep, GFP_NOFS);
135         if (!jfs_inode)
136                 return NULL;
137         return &jfs_inode->vfs_inode;
138 }
139
140 static void jfs_destroy_inode(struct inode *inode)
141 {
142         struct jfs_inode_info *ji = JFS_IP(inode);
143
144         if (ji->active_ag != -1) {
145                 struct bmap *bmap = JFS_SBI(inode->i_sb)->bmap;
146                 atomic_dec(&bmap->db_active[ji->active_ag]);
147         }
148
149 #ifdef CONFIG_JFS_POSIX_ACL
150         if (ji->i_acl != JFS_ACL_NOT_CACHED) {
151                 posix_acl_release(ji->i_acl);
152                 ji->i_acl = JFS_ACL_NOT_CACHED;
153         }
154         if (ji->i_default_acl != JFS_ACL_NOT_CACHED) {
155                 posix_acl_release(ji->i_default_acl);
156                 ji->i_default_acl = JFS_ACL_NOT_CACHED;
157         }
158 #endif
159
160         kmem_cache_free(jfs_inode_cachep, ji);
161 }
162
163 static int jfs_statfs(struct super_block *sb, struct kstatfs *buf)
164 {
165         struct jfs_sb_info *sbi = JFS_SBI(sb);
166         s64 maxinodes;
167         struct inomap *imap = JFS_IP(sbi->ipimap)->i_imap;
168
169         jfs_info("In jfs_statfs");
170         buf->f_type = JFS_SUPER_MAGIC;
171         buf->f_bsize = sbi->bsize;
172         buf->f_blocks = sbi->bmap->db_mapsize;
173         buf->f_bfree = sbi->bmap->db_nfree;
174         buf->f_bavail = sbi->bmap->db_nfree;
175         /*
176          * If we really return the number of allocated & free inodes, some
177          * applications will fail because they won't see enough free inodes.
178          * We'll try to calculate some guess as to how may inodes we can
179          * really allocate
180          *
181          * buf->f_files = atomic_read(&imap->im_numinos);
182          * buf->f_ffree = atomic_read(&imap->im_numfree);
183          */
184         maxinodes = min((s64) atomic_read(&imap->im_numinos) +
185                         ((sbi->bmap->db_nfree >> imap->im_l2nbperiext)
186                          << L2INOSPEREXT), (s64) 0xffffffffLL);
187         buf->f_files = maxinodes;
188         buf->f_ffree = maxinodes - (atomic_read(&imap->im_numinos) -
189                                     atomic_read(&imap->im_numfree));
190
191         buf->f_namelen = JFS_NAME_MAX;
192         return 0;
193 }
194
195 static void jfs_put_super(struct super_block *sb)
196 {
197         struct jfs_sb_info *sbi = JFS_SBI(sb);
198         int rc;
199
200         jfs_info("In jfs_put_super");
201         rc = jfs_umount(sb);
202         if (rc)
203                 jfs_err("jfs_umount failed with return code %d", rc);
204         if (sbi->nls_tab)
205                 unload_nls(sbi->nls_tab);
206         sbi->nls_tab = NULL;
207
208         kfree(sbi);
209 }
210
211 enum {
212         Opt_integrity, Opt_nointegrity, Opt_iocharset, Opt_resize,
213         Opt_resize_nosize, Opt_errors, Opt_ignore, Opt_err,
214 };
215
216 static match_table_t tokens = {
217         {Opt_integrity, "integrity"},
218         {Opt_nointegrity, "nointegrity"},
219         {Opt_iocharset, "iocharset=%s"},
220         {Opt_resize, "resize=%u"},
221         {Opt_resize_nosize, "resize"},
222         {Opt_errors, "errors=%s"},
223         {Opt_ignore, "noquota"},
224         {Opt_ignore, "quota"},
225         {Opt_ignore, "usrquota"},
226         {Opt_ignore, "grpquota"},
227         {Opt_err, NULL}
228 };
229
230 static int parse_options(char *options, struct super_block *sb, s64 *newLVSize,
231                          int *flag)
232 {
233         void *nls_map = NULL;
234         char *p;
235         struct jfs_sb_info *sbi = JFS_SBI(sb);
236
237         *newLVSize = 0;
238
239         if (!options)
240                 return 1;
241
242         while ((p = strsep(&options, ",")) != NULL) {
243                 substring_t args[MAX_OPT_ARGS];
244                 int token;
245                 if (!*p)
246                         continue;
247
248                 token = match_token(p, tokens, args);
249                 switch (token) {
250                 case Opt_integrity:
251                         *flag &= ~JFS_NOINTEGRITY;
252                         break;
253                 case Opt_nointegrity:
254                         *flag |= JFS_NOINTEGRITY;
255                         break;
256                 case Opt_ignore:
257                         /* Silently ignore the quota options */
258                         /* Don't do anything ;-) */
259                         break;
260                 case Opt_iocharset:
261                         if (nls_map)    /* specified iocharset twice! */
262                                 unload_nls(nls_map);
263                         nls_map = load_nls(args[0].from);
264                         if (!nls_map) {
265                                 printk(KERN_ERR "JFS: charset not found\n");
266                                 goto cleanup;
267                         }
268                         break;
269                 case Opt_resize:
270                 {
271                         char *resize = args[0].from;
272                         *newLVSize = simple_strtoull(resize, &resize, 0);
273                         break;
274                 }
275                 case Opt_resize_nosize:
276                 {
277                         *newLVSize = sb->s_bdev->bd_inode->i_size >>
278                                 sb->s_blocksize_bits;
279                         if (*newLVSize == 0)
280                                 printk(KERN_ERR
281                                        "JFS: Cannot determine volume size\n");
282                         break;
283                 }
284                 case Opt_errors:
285                 {
286                         char *errors = args[0].from;
287                         if (!errors || !*errors)
288                                 goto cleanup;
289                         if (!strcmp(errors, "continue")) {
290                                 *flag &= ~JFS_ERR_REMOUNT_RO;
291                                 *flag &= ~JFS_ERR_PANIC;
292                                 *flag |= JFS_ERR_CONTINUE;
293                         } else if (!strcmp(errors, "remount-ro")) {
294                                 *flag &= ~JFS_ERR_CONTINUE;
295                                 *flag &= ~JFS_ERR_PANIC;
296                                 *flag |= JFS_ERR_REMOUNT_RO;
297                         } else if (!strcmp(errors, "panic")) {
298                                 *flag &= ~JFS_ERR_CONTINUE;
299                                 *flag &= ~JFS_ERR_REMOUNT_RO;
300                                 *flag |= JFS_ERR_PANIC;
301                         } else {
302                                 printk(KERN_ERR
303                                        "JFS: %s is an invalid error handler\n",
304                                        errors);
305                                 goto cleanup;
306                         }
307                         break;
308                 }
309                 default:
310                         printk("jfs: Unrecognized mount option \"%s\" "
311                                         " or missing value\n", p);
312                         goto cleanup;
313                 }
314         }
315
316         if (nls_map) {
317                 /* Discard old (if remount) */
318                 if (sbi->nls_tab)
319                         unload_nls(sbi->nls_tab);
320                 sbi->nls_tab = nls_map;
321         }
322         return 1;
323
324 cleanup:
325         if (nls_map)
326                 unload_nls(nls_map);
327         return 0;
328 }
329
330 static int jfs_remount(struct super_block *sb, int *flags, char *data)
331 {
332         s64 newLVSize = 0;
333         int rc = 0;
334         int flag = JFS_SBI(sb)->flag;
335
336         if (!parse_options(data, sb, &newLVSize, &flag)) {
337                 return -EINVAL;
338         }
339         if (newLVSize) {
340                 if (sb->s_flags & MS_RDONLY) {
341                         printk(KERN_ERR
342                   "JFS: resize requires volume to be mounted read-write\n");
343                         return -EROFS;
344                 }
345                 rc = jfs_extendfs(sb, newLVSize, 0);
346                 if (rc)
347                         return rc;
348         }
349
350         if ((sb->s_flags & MS_RDONLY) && !(*flags & MS_RDONLY)) {
351                 JFS_SBI(sb)->flag = flag;
352                 return jfs_mount_rw(sb, 1);
353         }
354         if ((!(sb->s_flags & MS_RDONLY)) && (*flags & MS_RDONLY)) {
355                 rc = jfs_umount_rw(sb);
356                 JFS_SBI(sb)->flag = flag;
357                 return rc;
358         }
359         if ((JFS_SBI(sb)->flag & JFS_NOINTEGRITY) != (flag & JFS_NOINTEGRITY))
360                 if (!(sb->s_flags & MS_RDONLY)) {
361                         rc = jfs_umount_rw(sb);
362                         if (rc)
363                                 return rc;
364                         JFS_SBI(sb)->flag = flag;
365                         return jfs_mount_rw(sb, 1);
366                 }
367         JFS_SBI(sb)->flag = flag;
368
369         return 0;
370 }
371
372 static int jfs_fill_super(struct super_block *sb, void *data, int silent)
373 {
374         struct jfs_sb_info *sbi;
375         struct inode *inode;
376         int rc;
377         s64 newLVSize = 0;
378         int flag;
379
380         jfs_info("In jfs_read_super: s_flags=0x%lx", sb->s_flags);
381
382         if (!new_valid_dev(sb->s_bdev->bd_dev))
383                 return -EOVERFLOW;
384
385         sbi = kmalloc(sizeof (struct jfs_sb_info), GFP_KERNEL);
386         if (!sbi)
387                 return -ENOSPC;
388         memset(sbi, 0, sizeof (struct jfs_sb_info));
389         sb->s_fs_info = sbi;
390         sbi->sb = sb;
391
392         /* initialize the mount flag and determine the default error handler */
393         flag = JFS_ERR_REMOUNT_RO;
394
395         if (!parse_options((char *) data, sb, &newLVSize, &flag)) {
396                 kfree(sbi);
397                 return -EINVAL;
398         }
399         sbi->flag = flag;
400
401         if (newLVSize) {
402                 printk(KERN_ERR "resize option for remount only\n");
403                 return -EINVAL;
404         }
405
406         /*
407          * Initialize blocksize to 4K.
408          */
409         sb_set_blocksize(sb, PSIZE);
410
411         /*
412          * Set method vectors.
413          */
414         sb->s_op = &jfs_super_operations;
415         sb->s_export_op = &jfs_export_operations;
416
417         rc = jfs_mount(sb);
418         if (rc) {
419                 if (!silent) {
420                         jfs_err("jfs_mount failed w/return code = %d", rc);
421                 }
422                 goto out_kfree;
423         }
424         if (sb->s_flags & MS_RDONLY)
425                 sbi->log = 0;
426         else {
427                 rc = jfs_mount_rw(sb, 0);
428                 if (rc) {
429                         if (!silent) {
430                                 jfs_err("jfs_mount_rw failed, return code = %d",
431                                         rc);
432                         }
433                         goto out_no_rw;
434                 }
435         }
436
437         sb->s_magic = JFS_SUPER_MAGIC;
438
439         inode = iget(sb, ROOT_I);
440         if (!inode || is_bad_inode(inode))
441                 goto out_no_root;
442         sb->s_root = d_alloc_root(inode);
443         if (!sb->s_root)
444                 goto out_no_root;
445
446         /* logical blocks are represented by 40 bits in pxd_t, etc. */
447         sb->s_maxbytes = ((u64) sb->s_blocksize) << 40;
448 #if BITS_PER_LONG == 32
449         /*
450          * Page cache is indexed by long.
451          * I would use MAX_LFS_FILESIZE, but it's only half as big
452          */
453         sb->s_maxbytes = min(((u64) PAGE_CACHE_SIZE << 32) - 1, sb->s_maxbytes);
454 #endif
455
456         return 0;
457
458 out_no_root:
459         jfs_err("jfs_read_super: get root inode failed");
460         if (inode)
461                 iput(inode);
462
463 out_no_rw:
464         rc = jfs_umount(sb);
465         if (rc) {
466                 jfs_err("jfs_umount failed with return code %d", rc);
467         }
468 out_kfree:
469         if (sbi->nls_tab)
470                 unload_nls(sbi->nls_tab);
471         kfree(sbi);
472         return -EINVAL;
473 }
474
475 static void jfs_write_super_lockfs(struct super_block *sb)
476 {
477         struct jfs_sb_info *sbi = JFS_SBI(sb);
478         struct jfs_log *log = sbi->log;
479
480         if (!(sb->s_flags & MS_RDONLY)) {
481                 txQuiesce(sb);
482                 lmLogShutdown(log);
483                 updateSuper(sb, FM_CLEAN);
484         }
485 }
486
487 static void jfs_unlockfs(struct super_block *sb)
488 {
489         struct jfs_sb_info *sbi = JFS_SBI(sb);
490         struct jfs_log *log = sbi->log;
491         int rc = 0;
492
493         if (!(sb->s_flags & MS_RDONLY)) {
494                 updateSuper(sb, FM_MOUNT);
495                 if ((rc = lmLogInit(log)))
496                         jfs_err("jfs_unlock failed with return code %d", rc);
497                 else
498                         txResume(sb);
499         }
500 }
501
502 static struct super_block *jfs_get_sb(struct file_system_type *fs_type, 
503         int flags, const char *dev_name, void *data)
504 {
505         return get_sb_bdev(fs_type, flags, dev_name, data, jfs_fill_super);
506 }
507
508 static int jfs_sync_fs(struct super_block *sb, int wait)
509 {
510         struct jfs_log *log = JFS_SBI(sb)->log;
511
512         /* log == NULL indicates read-only mount */
513         if (log)
514                 jfs_flush_journal(log, wait);
515
516         return 0;
517 }
518
519 static struct super_operations jfs_super_operations = {
520         .alloc_inode    = jfs_alloc_inode,
521         .destroy_inode  = jfs_destroy_inode,
522         .read_inode     = jfs_read_inode,
523         .dirty_inode    = jfs_dirty_inode,
524         .write_inode    = jfs_write_inode,
525         .delete_inode   = jfs_delete_inode,
526         .put_super      = jfs_put_super,
527         .sync_fs        = jfs_sync_fs,
528         .write_super_lockfs = jfs_write_super_lockfs,
529         .unlockfs       = jfs_unlockfs,
530         .statfs         = jfs_statfs,
531         .remount_fs     = jfs_remount,
532 };
533
534 static struct export_operations jfs_export_operations = {
535         .get_parent     = jfs_get_parent,
536 };
537
538 static struct file_system_type jfs_fs_type = {
539         .owner          = THIS_MODULE,
540         .name           = "jfs",
541         .get_sb         = jfs_get_sb,
542         .kill_sb        = kill_block_super,
543         .fs_flags       = FS_REQUIRES_DEV,
544 };
545
546 extern int metapage_init(void);
547 extern int txInit(void);
548 extern void txExit(void);
549 extern void metapage_exit(void);
550
551 static void init_once(void *foo, kmem_cache_t * cachep, unsigned long flags)
552 {
553         struct jfs_inode_info *jfs_ip = (struct jfs_inode_info *) foo;
554
555         if ((flags & (SLAB_CTOR_VERIFY | SLAB_CTOR_CONSTRUCTOR)) ==
556             SLAB_CTOR_CONSTRUCTOR) {
557                 memset(jfs_ip, 0, sizeof(struct jfs_inode_info));
558                 INIT_LIST_HEAD(&jfs_ip->anon_inode_list);
559                 init_rwsem(&jfs_ip->rdwrlock);
560                 init_MUTEX(&jfs_ip->commit_sem);
561                 init_rwsem(&jfs_ip->xattr_sem);
562                 jfs_ip->active_ag = -1;
563 #ifdef CONFIG_JFS_POSIX_ACL
564                 jfs_ip->i_acl = JFS_ACL_NOT_CACHED;
565                 jfs_ip->i_default_acl = JFS_ACL_NOT_CACHED;
566 #endif
567                 inode_init_once(&jfs_ip->vfs_inode);
568         }
569 }
570
571 static int __init init_jfs_fs(void)
572 {
573         int i;
574         int rc;
575
576         jfs_inode_cachep =
577             kmem_cache_create("jfs_ip", sizeof(struct jfs_inode_info), 0, 
578                             SLAB_RECLAIM_ACCOUNT, init_once, NULL);
579         if (jfs_inode_cachep == NULL)
580                 return -ENOMEM;
581
582         /*
583          * Metapage initialization
584          */
585         rc = metapage_init();
586         if (rc) {
587                 jfs_err("metapage_init failed w/rc = %d", rc);
588                 goto free_slab;
589         }
590
591         /*
592          * Transaction Manager initialization
593          */
594         rc = txInit();
595         if (rc) {
596                 jfs_err("txInit failed w/rc = %d", rc);
597                 goto free_metapage;
598         }
599
600         /*
601          * I/O completion thread (endio)
602          */
603         jfsIOthread = kernel_thread(jfsIOWait, 0, CLONE_KERNEL);
604         if (jfsIOthread < 0) {
605                 jfs_err("init_jfs_fs: fork failed w/rc = %d", jfsIOthread);
606                 goto end_txmngr;
607         }
608         wait_for_completion(&jfsIOwait);        /* Wait until thread starts */
609
610         if (commit_threads < 1)
611                 commit_threads = num_online_cpus();
612         else if (commit_threads > MAX_COMMIT_THREADS)
613                 commit_threads = MAX_COMMIT_THREADS;
614
615         for (i = 0; i < commit_threads; i++) {
616                 jfsCommitThread[i] = kernel_thread(jfs_lazycommit, 0,
617                                                    CLONE_KERNEL);
618                 if (jfsCommitThread[i] < 0) {
619                         jfs_err("init_jfs_fs: fork failed w/rc = %d",
620                                 jfsCommitThread[i]);
621                         commit_threads = i;
622                         goto kill_committask;
623                 }
624                 /* Wait until thread starts */
625                 wait_for_completion(&jfsIOwait);
626         }
627
628         jfsSyncThread = kernel_thread(jfs_sync, 0, CLONE_KERNEL);
629         if (jfsSyncThread < 0) {
630                 jfs_err("init_jfs_fs: fork failed w/rc = %d", jfsSyncThread);
631                 goto kill_committask;
632         }
633         wait_for_completion(&jfsIOwait);        /* Wait until thread starts */
634
635 #ifdef PROC_FS_JFS
636         jfs_proc_init();
637 #endif
638
639         return register_filesystem(&jfs_fs_type);
640
641 kill_committask:
642         jfs_stop_threads = 1;
643         wake_up_all(&jfs_commit_thread_wait);
644         for (i = 0; i < commit_threads; i++)
645                 wait_for_completion(&jfsIOwait);
646
647         wake_up(&jfs_IO_thread_wait);
648         wait_for_completion(&jfsIOwait);        /* Wait for thread exit */
649 end_txmngr:
650         txExit();
651 free_metapage:
652         metapage_exit();
653 free_slab:
654         kmem_cache_destroy(jfs_inode_cachep);
655         return rc;
656 }
657
658 static void __exit exit_jfs_fs(void)
659 {
660         int i;
661
662         jfs_info("exit_jfs_fs called");
663
664         jfs_stop_threads = 1;
665         txExit();
666         metapage_exit();
667         wake_up(&jfs_IO_thread_wait);
668         wait_for_completion(&jfsIOwait);        /* Wait until IO thread exits */
669         wake_up_all(&jfs_commit_thread_wait);
670         for (i = 0; i < commit_threads; i++)
671                 wait_for_completion(&jfsIOwait);
672         wake_up(&jfs_sync_thread_wait);
673         wait_for_completion(&jfsIOwait);        /* Wait until Sync thread exits */
674 #ifdef PROC_FS_JFS
675         jfs_proc_clean();
676 #endif
677         unregister_filesystem(&jfs_fs_type);
678         kmem_cache_destroy(jfs_inode_cachep);
679 }
680
681 module_init(init_jfs_fs)
682 module_exit(exit_jfs_fs)