diff options
Diffstat (limited to 'fs/befs')
-rw-r--r-- | fs/befs/ChangeLog | 10 | ||||
-rw-r--r-- | fs/befs/befs_fs_types.h | 2 | ||||
-rw-r--r-- | fs/befs/btree.c | 2 | ||||
-rw-r--r-- | fs/befs/endian.h | 16 | ||||
-rw-r--r-- | fs/befs/linuxvfs.c | 26 |
5 files changed, 30 insertions, 26 deletions
diff --git a/fs/befs/ChangeLog b/fs/befs/ChangeLog index ce8c787916be..75a461cfaca6 100644 --- a/fs/befs/ChangeLog +++ b/fs/befs/ChangeLog | |||
@@ -24,7 +24,7 @@ Version 0.9 (2002-03-14) | |||
24 | 24 | ||
25 | Version 0.64 (2002-02-07) | 25 | Version 0.64 (2002-02-07) |
26 | ========== | 26 | ========== |
27 | * Did the string comparision really right this time (btree.c) [WD] | 27 | * Did the string comparison really right this time (btree.c) [WD] |
28 | 28 | ||
29 | * Fixed up some places where I assumed that a long int could hold | 29 | * Fixed up some places where I assumed that a long int could hold |
30 | a pointer value. (btree.c) [WD] | 30 | a pointer value. (btree.c) [WD] |
@@ -114,7 +114,7 @@ Version 0.6 (2001-12-15) | |||
114 | More flexible. Will soon be controllable at mount time | 114 | More flexible. Will soon be controllable at mount time |
115 | (see TODO). [WD] | 115 | (see TODO). [WD] |
116 | 116 | ||
117 | * Rewrote datastream positon lookups. | 117 | * Rewrote datastream position lookups. |
118 | (datastream.c) [WD] | 118 | (datastream.c) [WD] |
119 | 119 | ||
120 | * Moved the TODO list to its own file. | 120 | * Moved the TODO list to its own file. |
@@ -150,7 +150,7 @@ Version 0.50 (2001-11-13) | |||
150 | * Anton also told me that the blocksize is not allowed to be larger than | 150 | * Anton also told me that the blocksize is not allowed to be larger than |
151 | the page size in linux, which is 4k i386. Oops. Added a test for | 151 | the page size in linux, which is 4k i386. Oops. Added a test for |
152 | (blocksize > PAGE_SIZE), and refuse to mount in that case. What this | 152 | (blocksize > PAGE_SIZE), and refuse to mount in that case. What this |
153 | practicaly means is that 8k blocksize volumes won't work without a major | 153 | practically means is that 8k blocksize volumes won't work without a major |
154 | restructuring of the driver (or an alpha or other 64bit hardware). [WD] | 154 | restructuring of the driver (or an alpha or other 64bit hardware). [WD] |
155 | 155 | ||
156 | * Cleaned up the befs_count_blocks() function. Much smarter now. | 156 | * Cleaned up the befs_count_blocks() function. Much smarter now. |
@@ -183,7 +183,7 @@ Version 0.45 (2001-10-29) | |||
183 | structures into the generic pointer fields of the public structures | 183 | structures into the generic pointer fields of the public structures |
184 | with kmalloc(). put_super and put_inode free them. This allows us not | 184 | with kmalloc(). put_super and put_inode free them. This allows us not |
185 | to have to touch the definitions of the public structures in | 185 | to have to touch the definitions of the public structures in |
186 | include/linux/fs.h. Also, befs_inode_info is huge (becuase of the | 186 | include/linux/fs.h. Also, befs_inode_info is huge (because of the |
187 | symlink string). (super.c, inode.c, befs_fs.h) [WD] | 187 | symlink string). (super.c, inode.c, befs_fs.h) [WD] |
188 | 188 | ||
189 | * Fixed a thinko that was corrupting file reads after the first block_run | 189 | * Fixed a thinko that was corrupting file reads after the first block_run |
@@ -404,7 +404,7 @@ Version 0.4 (2001-10-28) | |||
404 | 404 | ||
405 | * Fixed compile errors on 2.4.1 kernel (WD) | 405 | * Fixed compile errors on 2.4.1 kernel (WD) |
406 | Resolve rejected patches | 406 | Resolve rejected patches |
407 | Accomodate changed NLS interface (util.h) | 407 | Accommodate changed NLS interface (util.h) |
408 | Needed to include <linux/slab.h> in most files | 408 | Needed to include <linux/slab.h> in most files |
409 | Makefile changes | 409 | Makefile changes |
410 | fs/Config.in changes | 410 | fs/Config.in changes |
diff --git a/fs/befs/befs_fs_types.h b/fs/befs/befs_fs_types.h index 7893eaa1e58c..eb557d9dc8be 100644 --- a/fs/befs/befs_fs_types.h +++ b/fs/befs/befs_fs_types.h | |||
@@ -234,7 +234,7 @@ typedef struct { | |||
234 | } PACKED befs_btree_super; | 234 | } PACKED befs_btree_super; |
235 | 235 | ||
236 | /* | 236 | /* |
237 | * Header stucture of each btree node | 237 | * Header structure of each btree node |
238 | */ | 238 | */ |
239 | typedef struct { | 239 | typedef struct { |
240 | fs64 left; | 240 | fs64 left; |
diff --git a/fs/befs/btree.c b/fs/befs/btree.c index 4202db7496cb..a66c9b1136e0 100644 --- a/fs/befs/btree.c +++ b/fs/befs/btree.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * | 5 | * |
6 | * Licensed under the GNU GPL. See the file COPYING for details. | 6 | * Licensed under the GNU GPL. See the file COPYING for details. |
7 | * | 7 | * |
8 | * 2002-02-05: Sergey S. Kostyliov added binary search withing | 8 | * 2002-02-05: Sergey S. Kostyliov added binary search within |
9 | * btree nodes. | 9 | * btree nodes. |
10 | * | 10 | * |
11 | * Many thanks to: | 11 | * Many thanks to: |
diff --git a/fs/befs/endian.h b/fs/befs/endian.h index 6cb84d896d05..27223878ba9f 100644 --- a/fs/befs/endian.h +++ b/fs/befs/endian.h | |||
@@ -102,22 +102,22 @@ cpu_to_fsrun(const struct super_block *sb, befs_block_run n) | |||
102 | } | 102 | } |
103 | 103 | ||
104 | static inline befs_data_stream | 104 | static inline befs_data_stream |
105 | fsds_to_cpu(const struct super_block *sb, befs_disk_data_stream n) | 105 | fsds_to_cpu(const struct super_block *sb, const befs_disk_data_stream *n) |
106 | { | 106 | { |
107 | befs_data_stream data; | 107 | befs_data_stream data; |
108 | int i; | 108 | int i; |
109 | 109 | ||
110 | for (i = 0; i < BEFS_NUM_DIRECT_BLOCKS; ++i) | 110 | for (i = 0; i < BEFS_NUM_DIRECT_BLOCKS; ++i) |
111 | data.direct[i] = fsrun_to_cpu(sb, n.direct[i]); | 111 | data.direct[i] = fsrun_to_cpu(sb, n->direct[i]); |
112 | 112 | ||
113 | data.max_direct_range = fs64_to_cpu(sb, n.max_direct_range); | 113 | data.max_direct_range = fs64_to_cpu(sb, n->max_direct_range); |
114 | data.indirect = fsrun_to_cpu(sb, n.indirect); | 114 | data.indirect = fsrun_to_cpu(sb, n->indirect); |
115 | data.max_indirect_range = fs64_to_cpu(sb, n.max_indirect_range); | 115 | data.max_indirect_range = fs64_to_cpu(sb, n->max_indirect_range); |
116 | data.double_indirect = fsrun_to_cpu(sb, n.double_indirect); | 116 | data.double_indirect = fsrun_to_cpu(sb, n->double_indirect); |
117 | data.max_double_indirect_range = fs64_to_cpu(sb, | 117 | data.max_double_indirect_range = fs64_to_cpu(sb, |
118 | n. | 118 | n-> |
119 | max_double_indirect_range); | 119 | max_double_indirect_range); |
120 | data.size = fs64_to_cpu(sb, n.size); | 120 | data.size = fs64_to_cpu(sb, n->size); |
121 | 121 | ||
122 | return data; | 122 | return data; |
123 | } | 123 | } |
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index dc39d2824885..54b8c28bebc8 100644 --- a/fs/befs/linuxvfs.c +++ b/fs/befs/linuxvfs.c | |||
@@ -75,7 +75,6 @@ static const struct inode_operations befs_dir_inode_operations = { | |||
75 | 75 | ||
76 | static const struct address_space_operations befs_aops = { | 76 | static const struct address_space_operations befs_aops = { |
77 | .readpage = befs_readpage, | 77 | .readpage = befs_readpage, |
78 | .sync_page = block_sync_page, | ||
79 | .bmap = befs_bmap, | 78 | .bmap = befs_bmap, |
80 | }; | 79 | }; |
81 | 80 | ||
@@ -284,12 +283,18 @@ befs_alloc_inode(struct super_block *sb) | |||
284 | return &bi->vfs_inode; | 283 | return &bi->vfs_inode; |
285 | } | 284 | } |
286 | 285 | ||
287 | static void | 286 | static void befs_i_callback(struct rcu_head *head) |
288 | befs_destroy_inode(struct inode *inode) | ||
289 | { | 287 | { |
288 | struct inode *inode = container_of(head, struct inode, i_rcu); | ||
289 | INIT_LIST_HEAD(&inode->i_dentry); | ||
290 | kmem_cache_free(befs_inode_cachep, BEFS_I(inode)); | 290 | kmem_cache_free(befs_inode_cachep, BEFS_I(inode)); |
291 | } | 291 | } |
292 | 292 | ||
293 | static void befs_destroy_inode(struct inode *inode) | ||
294 | { | ||
295 | call_rcu(&inode->i_rcu, befs_i_callback); | ||
296 | } | ||
297 | |||
293 | static void init_once(void *foo) | 298 | static void init_once(void *foo) |
294 | { | 299 | { |
295 | struct befs_inode_info *bi = (struct befs_inode_info *) foo; | 300 | struct befs_inode_info *bi = (struct befs_inode_info *) foo; |
@@ -384,7 +389,7 @@ static struct inode *befs_iget(struct super_block *sb, unsigned long ino) | |||
384 | int num_blks; | 389 | int num_blks; |
385 | 390 | ||
386 | befs_ino->i_data.ds = | 391 | befs_ino->i_data.ds = |
387 | fsds_to_cpu(sb, raw_inode->data.datastream); | 392 | fsds_to_cpu(sb, &raw_inode->data.datastream); |
388 | 393 | ||
389 | num_blks = befs_count_blocks(sb, &befs_ino->i_data.ds); | 394 | num_blks = befs_count_blocks(sb, &befs_ino->i_data.ds); |
390 | inode->i_blocks = | 395 | inode->i_blocks = |
@@ -729,7 +734,7 @@ parse_options(char *options, befs_mount_options * opts) | |||
729 | 734 | ||
730 | /* This function has the responsibiltiy of getting the | 735 | /* This function has the responsibiltiy of getting the |
731 | * filesystem ready for unmounting. | 736 | * filesystem ready for unmounting. |
732 | * Basicly, we free everything that we allocated in | 737 | * Basically, we free everything that we allocated in |
733 | * befs_read_inode | 738 | * befs_read_inode |
734 | */ | 739 | */ |
735 | static void | 740 | static void |
@@ -913,18 +918,17 @@ befs_statfs(struct dentry *dentry, struct kstatfs *buf) | |||
913 | return 0; | 918 | return 0; |
914 | } | 919 | } |
915 | 920 | ||
916 | static int | 921 | static struct dentry * |
917 | befs_get_sb(struct file_system_type *fs_type, int flags, const char *dev_name, | 922 | befs_mount(struct file_system_type *fs_type, int flags, const char *dev_name, |
918 | void *data, struct vfsmount *mnt) | 923 | void *data) |
919 | { | 924 | { |
920 | return get_sb_bdev(fs_type, flags, dev_name, data, befs_fill_super, | 925 | return mount_bdev(fs_type, flags, dev_name, data, befs_fill_super); |
921 | mnt); | ||
922 | } | 926 | } |
923 | 927 | ||
924 | static struct file_system_type befs_fs_type = { | 928 | static struct file_system_type befs_fs_type = { |
925 | .owner = THIS_MODULE, | 929 | .owner = THIS_MODULE, |
926 | .name = "befs", | 930 | .name = "befs", |
927 | .get_sb = befs_get_sb, | 931 | .mount = befs_mount, |
928 | .kill_sb = kill_block_super, | 932 | .kill_sb = kill_block_super, |
929 | .fs_flags = FS_REQUIRES_DEV, | 933 | .fs_flags = FS_REQUIRES_DEV, |
930 | }; | 934 | }; |