diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-03-19 01:28:40 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-03-19 01:28:40 +0000 |
commit | 8abb719409c9060a7c0676f76e9182c1e0b8ca46 (patch) | |
tree | b88cc5a6cd513a04a512b7e6215c873c90a1c5dd /fs/hpfs | |
parent | f01bd7aeafd95a08aafc9e3636bb26974df69d82 (diff) |
Merge with 2.3.99-pre1.
Diffstat (limited to 'fs/hpfs')
-rw-r--r-- | fs/hpfs/buffer.c | 9 | ||||
-rw-r--r-- | fs/hpfs/hpfs_fn.h | 1 | ||||
-rw-r--r-- | fs/hpfs/inode.c | 1 | ||||
-rw-r--r-- | fs/hpfs/super.c | 22 |
4 files changed, 14 insertions, 19 deletions
diff --git a/fs/hpfs/buffer.c b/fs/hpfs/buffer.c index 8bcbf28fc..dc9ccf624 100644 --- a/fs/hpfs/buffer.c +++ b/fs/hpfs/buffer.c @@ -125,7 +125,8 @@ void *hpfs_map_sector(struct super_block *s, unsigned secno, struct buffer_head kdev_t dev = s->s_dev; struct buffer_head *bh; - if (!ahead || secno + ahead >= s->s_hpfs_fs_size) + /* vvvv - workaround for the breada bug */ + if (!ahead || secno + ahead + (read_ahead[MAJOR(dev)] >> 9) >= s->s_hpfs_fs_size) *bhp = bh = bread(dev, secno, 512); else *bhp = bh = breada(dev, secno, 512, 0, (ahead + 1) << 9); if (bh != NULL) @@ -144,6 +145,7 @@ void *hpfs_get_sector(struct super_block *s, unsigned secno, struct buffer_head /*return hpfs_map_sector(s, secno, bhp, 0);*/ if ((*bhp = bh = getblk(s->s_dev, secno, 512)) != NULL) { + if (!buffer_uptodate(bh)) wait_on_buffer(bh); mark_buffer_uptodate(bh, 1); return bh->b_data; } else { @@ -172,8 +174,9 @@ void *hpfs_map_4sectors(struct super_block *s, unsigned secno, struct quad_buffe goto bail; } - if (!ahead || secno + 4 + ahead > s->s_hpfs_fs_size) - qbh->bh[0] = bh = breada(dev, secno, 512, 0, 2048); + /* vvvv - workaround for the breada bug */ + if (!ahead || secno + 4 + ahead + (read_ahead[MAJOR(dev)] >> 9) > s->s_hpfs_fs_size) + qbh->bh[0] = bh = bread(dev, secno, 512); else qbh->bh[0] = bh = breada(dev, secno, 512, 0, (ahead + 4) << 9); if (!bh) goto bail0; diff --git a/fs/hpfs/hpfs_fn.h b/fs/hpfs/hpfs_fn.h index 677fda52c..5071782b0 100644 --- a/fs/hpfs/hpfs_fn.h +++ b/fs/hpfs/hpfs_fn.h @@ -312,6 +312,5 @@ int hpfs_remount_fs(struct super_block *, int *, char *); void hpfs_put_super(struct super_block *); unsigned hpfs_count_one_bitmap(struct super_block *, secno); int hpfs_statfs(struct super_block *, struct statfs *); -struct super_block *hpfs_read_super(struct super_block *, void *, int); extern struct address_space_operations hpfs_aops; diff --git a/fs/hpfs/inode.c b/fs/hpfs/inode.c index c8283c672..69303cb9e 100644 --- a/fs/hpfs/inode.c +++ b/fs/hpfs/inode.c @@ -314,4 +314,5 @@ void hpfs_write_if_changed(struct inode *inode) void hpfs_delete_inode(struct inode *inode) { hpfs_remove_fnode(inode->i_sb, inode->i_ino); + clear_inode(inode); } diff --git a/fs/hpfs/super.c b/fs/hpfs/super.c index d29f6e574..04cd6428d 100644 --- a/fs/hpfs/super.c +++ b/fs/hpfs/super.c @@ -9,6 +9,7 @@ #include <linux/string.h> #include "hpfs_fn.h" #include <linux/module.h> +#include <linux/init.h> /* Mark the filesystem dirty, so that chkdsk checks it when os/2 booted */ @@ -557,26 +558,17 @@ bail0: DECLARE_FSTYPE_DEV(hpfs_fs_type, "hpfs", hpfs_read_super); -int init_hpfs_fs(void) +static int __init init_hpfs_fs(void) { return register_filesystem(&hpfs_fs_type); } -#ifdef MODULE - -/*int register_symtab_from(struct symbol_table *, long *);*/ - -int init_module(void) -{ - /*int status; - if (!(status = init_hpfs_fs())) register_symtab(NULL); - return status;*/ - return init_hpfs_fs(); -} - -void cleanup_module(void) +static void __exit exit_hpfs_fs(void) { unregister_filesystem(&hpfs_fs_type); } -#endif +EXPORT_NO_SYMBOLS; + +module_init(init_hpfs_fs) +module_exit(exit_hpfs_fs) |