patch-1.3.22 linux/fs/hpfs/hpfs_fs.c
Next file: linux/fs/nfs/cache.c
Previous file: linux/fs/hpfs/hpfs_caps.c
Back to the patch index
Back to the overall index
- Lines: 90
- Date:
Fri Sep 1 09:11:02 1995
- Orig file:
v1.3.21/linux/fs/hpfs/hpfs_fs.c
- Orig date:
Thu Jul 27 10:13:17 1995
diff -u --recursive --new-file v1.3.21/linux/fs/hpfs/hpfs_fs.c linux/fs/hpfs/hpfs_fs.c
@@ -12,6 +12,14 @@
* linux/fs/isofs Copyright (C) 1991 Eric Youngdale
*/
+#ifdef MODULE
+#include <linux/module.h>
+#include <linux/version.h>
+#else
+#define MOD_INC_USE_COUNT
+#define MOD_DEC_USE_COUNT
+#endif
+
#include <linux/fs.h>
#include <linux/hpfs_fs.h>
#include <linux/errno.h>
@@ -343,6 +351,8 @@
int conv;
int dubious;
+ MOD_INC_USE_COUNT;
+
/*
* Get the mount options
*/
@@ -350,6 +360,7 @@
if (!parse_opts(options, &uid, &gid, &umask, &lowercase, &conv)) {
printk("HPFS: syntax error in mount options. Not mounted.\n");
s->s_dev = 0;
+ MOD_DEC_USE_COUNT;
return 0;
}
@@ -481,6 +492,7 @@
if (!s->s_mounted) {
printk("HPFS: hpfs_read_super: inode get failed\n");
s->s_dev = 0;
+ MOD_DEC_USE_COUNT;
return 0;
}
@@ -495,6 +507,7 @@
printk("HPFS: "
"hpfs_read_super: root dir isn't in the root dir\n");
s->s_dev = 0;
+ MOD_DEC_USE_COUNT;
return 0;
}
@@ -514,6 +527,7 @@
bail:
s->s_dev = 0;
unlock_super(s);
+ MOD_DEC_USE_COUNT;
return 0;
}
@@ -715,6 +729,7 @@
lock_super(s);
s->s_dev = 0;
unlock_super(s);
+ MOD_DEC_USE_COUNT;
}
/*
@@ -1725,3 +1740,25 @@
brelse(qbh->bh[0]);
kfree_s(qbh->data, 2048);
}
+
+#ifdef MODULE
+
+char kernel_version[] = UTS_RELEASE;
+
+static struct file_system_type hpfs_fs_type = {
+ hpfs_read_super, "hpfs", 1, NULL
+};
+
+int init_module(void)
+{
+ register_filesystem(&hpfs_fs_type);
+ return 0;
+}
+
+void cleanup_module(void)
+{
+ unregister_filesystem(&hpfs_fs_type);
+}
+
+#endif
+
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this