summaryrefslogtreecommitdiffstats
path: root/fs/minix
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1997-04-29 21:13:14 +0000
committer <ralf@linux-mips.org>1997-04-29 21:13:14 +0000
commit19c9bba94152148523ba0f7ef7cffe3d45656b11 (patch)
tree40b1cb534496a7f1ca0f5c314a523c69f1fee464 /fs/minix
parent7206675c40394c78a90e74812bbdbf8cf3cca1be (diff)
Import of Linux/MIPS 2.1.36
Diffstat (limited to 'fs/minix')
-rw-r--r--fs/minix/bitmap.c17
-rw-r--r--fs/minix/dir.c2
-rw-r--r--fs/minix/file.c2
-rw-r--r--fs/minix/inode.c33
4 files changed, 30 insertions, 24 deletions
diff --git a/fs/minix/bitmap.c b/fs/minix/bitmap.c
index 06d8fa907..2acbe5c17 100644
--- a/fs/minix/bitmap.c
+++ b/fs/minix/bitmap.c
@@ -4,6 +4,11 @@
* Copyright (C) 1991, 1992 Linus Torvalds
*/
+/*
+ * Modified for 680x0 by Hamish Macdonald
+ * Fixed for 680x0 by Andreas Schwab
+ */
+
/* bitmap.c contains the code that handles the inode and block bitmaps */
#include <linux/sched.h>
@@ -57,7 +62,7 @@ void minix_free_block(struct super_block * sb, int block)
printk("minix_free_block: nonexistent bitmap buffer\n");
return;
}
- if (!clear_bit(bit,bh->b_data))
+ if (!minix_clear_bit(bit,bh->b_data))
printk("free_block (%s:%d): bit already cleared\n",
kdevname(sb->s_dev), block);
mark_buffer_dirty(bh, 1);
@@ -77,11 +82,11 @@ repeat:
j = 8192;
for (i=0 ; i<64 ; i++)
if ((bh=sb->u.minix_sb.s_zmap[i]) != NULL)
- if ((j=find_first_zero_bit(bh->b_data, 8192)) < 8192)
+ if ((j=minix_find_first_zero_bit(bh->b_data, 8192)) < 8192)
break;
if (i>=64 || !bh || j>=8192)
return 0;
- if (set_bit(j,bh->b_data)) {
+ if (minix_set_bit(j,bh->b_data)) {
printk("new_block: bit already set");
goto repeat;
}
@@ -209,7 +214,7 @@ void minix_free_inode(struct inode * inode)
}
minix_clear_inode(inode);
clear_inode(inode);
- if (!clear_bit(ino & 8191, bh->b_data))
+ if (!minix_clear_bit(ino & 8191, bh->b_data))
printk("free_inode: bit %lu already cleared.\n",ino);
mark_buffer_dirty(bh, 1);
}
@@ -229,13 +234,13 @@ struct inode * minix_new_inode(const struct inode * dir)
j = 8192;
for (i=0 ; i<8 ; i++)
if ((bh = inode->i_sb->u.minix_sb.s_imap[i]) != NULL)
- if ((j=find_first_zero_bit(bh->b_data, 8192)) < 8192)
+ if ((j=minix_find_first_zero_bit(bh->b_data, 8192)) < 8192)
break;
if (!bh || j >= 8192) {
iput(inode);
return NULL;
}
- if (set_bit(j,bh->b_data)) { /* shouldn't happen */
+ if (minix_set_bit(j,bh->b_data)) { /* shouldn't happen */
printk("new_inode: bit already set");
iput(inode);
return NULL;
diff --git a/fs/minix/dir.c b/fs/minix/dir.c
index 851d1f7da..ec5113c4a 100644
--- a/fs/minix/dir.c
+++ b/fs/minix/dir.c
@@ -27,7 +27,7 @@ static struct file_operations minix_dir_operations = {
minix_dir_read, /* read */
NULL, /* write - bad */
minix_readdir, /* readdir */
- NULL, /* select - default */
+ NULL, /* poll - default */
NULL, /* ioctl - default */
NULL, /* mmap */
NULL, /* no special open code */
diff --git a/fs/minix/file.c b/fs/minix/file.c
index 009bd09ed..23aa70268 100644
--- a/fs/minix/file.c
+++ b/fs/minix/file.c
@@ -38,7 +38,7 @@ static struct file_operations minix_file_operations = {
generic_file_read, /* read */
minix_file_write, /* write */
NULL, /* readdir - bad */
- NULL, /* select - default */
+ NULL, /* poll - default */
NULL, /* ioctl - default */
generic_file_mmap, /* mmap */
NULL, /* no special open is needed */
diff --git a/fs/minix/inode.c b/fs/minix/inode.c
index e6fe65f48..faf5ce8a4 100644
--- a/fs/minix/inode.c
+++ b/fs/minix/inode.c
@@ -5,6 +5,8 @@
*
* Copyright (C) 1996 Gertjan van Wingerde (gertjan@cs.vu.nl)
* Minix V2 fs support.
+ *
+ * Modified for 680x0 by Andreas Schwab
*/
#include <linux/module.h>
@@ -16,6 +18,7 @@
#include <linux/string.h>
#include <linux/stat.h>
#include <linux/locks.h>
+#include <linux/init.h>
#include <asm/system.h>
#include <asm/uaccess.h>
@@ -72,7 +75,7 @@ void minix_put_super(struct super_block *sb)
return;
}
-static struct super_operations minix_sops = {
+static struct super_operations minix_sops = {
minix_read_inode,
NULL,
minix_write_inode,
@@ -161,7 +164,7 @@ static const char * minix_checkroot(struct super_block *s)
return errmsg;
}
-struct super_block *minix_read_super(struct super_block *s,void *data,
+struct super_block *minix_read_super(struct super_block *s,void *data,
int silent)
{
struct buffer_head *bh;
@@ -263,8 +266,8 @@ struct super_block *minix_read_super(struct super_block *s,void *data,
MOD_DEC_USE_COUNT;
return NULL;
}
- set_bit(0,s->u.minix_sb.s_imap[0]->b_data);
- set_bit(0,s->u.minix_sb.s_zmap[0]->b_data);
+ minix_set_bit(0,s->u.minix_sb.s_imap[0]->b_data);
+ minix_set_bit(0,s->u.minix_sb.s_zmap[0]->b_data);
unlock_super(s);
/* set up enough so that it can read an inode */
s->s_dev = dev;
@@ -439,7 +442,7 @@ int minix_bmap(struct inode * inode,int block)
/*
* The minix V1 fs getblk functions.
*/
-static struct buffer_head * V1_inode_getblk(struct inode * inode, int nr,
+static struct buffer_head * V1_inode_getblk(struct inode * inode, int nr,
int create)
{
int tmp;
@@ -473,7 +476,7 @@ repeat:
return result;
}
-static struct buffer_head * V1_block_getblk(struct inode * inode,
+static struct buffer_head * V1_block_getblk(struct inode * inode,
struct buffer_head * bh, int nr, int create)
{
int tmp;
@@ -523,7 +526,7 @@ repeat:
return result;
}
-static struct buffer_head * V1_minix_getblk(struct inode * inode, int block,
+static struct buffer_head * V1_minix_getblk(struct inode * inode, int block,
int create)
{
struct buffer_head * bh;
@@ -552,7 +555,7 @@ static struct buffer_head * V1_minix_getblk(struct inode * inode, int block,
/*
* The minix V2 fs getblk functions.
*/
-static struct buffer_head * V2_inode_getblk(struct inode * inode, int nr,
+static struct buffer_head * V2_inode_getblk(struct inode * inode, int nr,
int create)
{
int tmp;
@@ -586,7 +589,7 @@ repeat:
return result;
}
-static struct buffer_head * V2_block_getblk(struct inode * inode,
+static struct buffer_head * V2_block_getblk(struct inode * inode,
struct buffer_head * bh, int nr, int create)
{
int tmp;
@@ -636,7 +639,7 @@ repeat:
return result;
}
-static struct buffer_head * V2_minix_getblk(struct inode * inode, int block,
+static struct buffer_head * V2_minix_getblk(struct inode * inode, int block,
int create)
{
struct buffer_head * bh;
@@ -944,19 +947,17 @@ static struct file_system_type minix_fs_type = {
minix_read_super, "minix", 1, NULL
};
-int init_minix_fs(void)
+__initfunc(int init_minix_fs(void))
{
return register_filesystem(&minix_fs_type);
}
#ifdef MODULE
+EXPORT_NO_SYMBOLS;
+
int init_module(void)
{
- int status;
-
- if ((status = init_minix_fs()) == 0)
- register_symtab(0);
- return status;
+ return init_minix_fs();
}
void cleanup_module(void)