diff options
Diffstat (limited to 'fs/hfsplus')
-rw-r--r-- | fs/hfsplus/btree.c | 10 | ||||
-rw-r--r-- | fs/hfsplus/hfsplus_fs.h | 4 | ||||
-rw-r--r-- | fs/hfsplus/inode.c | 3 | ||||
-rw-r--r-- | fs/hfsplus/options.c | 3 | ||||
-rw-r--r-- | fs/hfsplus/super.c | 4 | ||||
-rw-r--r-- | fs/hfsplus/wrapper.c | 2 |
6 files changed, 16 insertions, 10 deletions
diff --git a/fs/hfsplus/btree.c b/fs/hfsplus/btree.c index bb5433608a42..e49fcee1e293 100644 --- a/fs/hfsplus/btree.c +++ b/fs/hfsplus/btree.c | |||
@@ -184,7 +184,9 @@ struct hfs_bnode *hfs_bmap_alloc(struct hfs_btree *tree) | |||
184 | struct hfs_bnode *node, *next_node; | 184 | struct hfs_bnode *node, *next_node; |
185 | struct page **pagep; | 185 | struct page **pagep; |
186 | u32 nidx, idx; | 186 | u32 nidx, idx; |
187 | u16 off, len; | 187 | unsigned off; |
188 | u16 off16; | ||
189 | u16 len; | ||
188 | u8 *data, byte, m; | 190 | u8 *data, byte, m; |
189 | int i; | 191 | int i; |
190 | 192 | ||
@@ -211,7 +213,8 @@ struct hfs_bnode *hfs_bmap_alloc(struct hfs_btree *tree) | |||
211 | node = hfs_bnode_find(tree, nidx); | 213 | node = hfs_bnode_find(tree, nidx); |
212 | if (IS_ERR(node)) | 214 | if (IS_ERR(node)) |
213 | return node; | 215 | return node; |
214 | len = hfs_brec_lenoff(node, 2, &off); | 216 | len = hfs_brec_lenoff(node, 2, &off16); |
217 | off = off16; | ||
215 | 218 | ||
216 | off += node->page_offset; | 219 | off += node->page_offset; |
217 | pagep = node->page + (off >> PAGE_CACHE_SHIFT); | 220 | pagep = node->page + (off >> PAGE_CACHE_SHIFT); |
@@ -256,7 +259,8 @@ struct hfs_bnode *hfs_bmap_alloc(struct hfs_btree *tree) | |||
256 | return next_node; | 259 | return next_node; |
257 | node = next_node; | 260 | node = next_node; |
258 | 261 | ||
259 | len = hfs_brec_lenoff(node, 0, &off); | 262 | len = hfs_brec_lenoff(node, 0, &off16); |
263 | off = off16; | ||
260 | off += node->page_offset; | 264 | off += node->page_offset; |
261 | pagep = node->page + (off >> PAGE_CACHE_SHIFT); | 265 | pagep = node->page + (off >> PAGE_CACHE_SHIFT); |
262 | data = kmap(*pagep); | 266 | data = kmap(*pagep); |
diff --git a/fs/hfsplus/hfsplus_fs.h b/fs/hfsplus/hfsplus_fs.h index d72d0a8b25aa..9e59537b43d5 100644 --- a/fs/hfsplus/hfsplus_fs.h +++ b/fs/hfsplus/hfsplus_fs.h | |||
@@ -311,6 +311,10 @@ int hfsplus_delete_cat(u32, struct inode *, struct qstr *); | |||
311 | int hfsplus_rename_cat(u32, struct inode *, struct qstr *, | 311 | int hfsplus_rename_cat(u32, struct inode *, struct qstr *, |
312 | struct inode *, struct qstr *); | 312 | struct inode *, struct qstr *); |
313 | 313 | ||
314 | /* dir.c */ | ||
315 | extern const struct inode_operations hfsplus_dir_inode_operations; | ||
316 | extern const struct file_operations hfsplus_dir_operations; | ||
317 | |||
314 | /* extents.c */ | 318 | /* extents.c */ |
315 | int hfsplus_ext_cmp_key(const hfsplus_btree_key *, const hfsplus_btree_key *); | 319 | int hfsplus_ext_cmp_key(const hfsplus_btree_key *, const hfsplus_btree_key *); |
316 | void hfsplus_ext_write_extent(struct inode *); | 320 | void hfsplus_ext_write_extent(struct inode *); |
diff --git a/fs/hfsplus/inode.c b/fs/hfsplus/inode.c index 37744cf3706a..d53b2af91c25 100644 --- a/fs/hfsplus/inode.c +++ b/fs/hfsplus/inode.c | |||
@@ -278,9 +278,6 @@ static int hfsplus_file_release(struct inode *inode, struct file *file) | |||
278 | return 0; | 278 | return 0; |
279 | } | 279 | } |
280 | 280 | ||
281 | extern const struct inode_operations hfsplus_dir_inode_operations; | ||
282 | extern struct file_operations hfsplus_dir_operations; | ||
283 | |||
284 | static const struct inode_operations hfsplus_file_inode_operations = { | 281 | static const struct inode_operations hfsplus_file_inode_operations = { |
285 | .lookup = hfsplus_file_lookup, | 282 | .lookup = hfsplus_file_lookup, |
286 | .truncate = hfsplus_file_truncate, | 283 | .truncate = hfsplus_file_truncate, |
diff --git a/fs/hfsplus/options.c b/fs/hfsplus/options.c index dc64fac00831..9997cbf8beb5 100644 --- a/fs/hfsplus/options.c +++ b/fs/hfsplus/options.c | |||
@@ -132,7 +132,8 @@ int hfsplus_parse_options(char *input, struct hfsplus_sb_info *sbi) | |||
132 | return 0; | 132 | return 0; |
133 | } | 133 | } |
134 | p = match_strdup(&args[0]); | 134 | p = match_strdup(&args[0]); |
135 | sbi->nls = load_nls(p); | 135 | if (p) |
136 | sbi->nls = load_nls(p); | ||
136 | if (!sbi->nls) { | 137 | if (!sbi->nls) { |
137 | printk(KERN_ERR "hfs: unable to load nls mapping \"%s\"\n", p); | 138 | printk(KERN_ERR "hfs: unable to load nls mapping \"%s\"\n", p); |
138 | kfree(p); | 139 | kfree(p); |
diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c index b0f9ad362d1d..ce97a54518d8 100644 --- a/fs/hfsplus/super.c +++ b/fs/hfsplus/super.c | |||
@@ -357,7 +357,7 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent) | |||
357 | printk(KERN_WARNING "hfs: Filesystem is marked locked, mounting read-only.\n"); | 357 | printk(KERN_WARNING "hfs: Filesystem is marked locked, mounting read-only.\n"); |
358 | sb->s_flags |= MS_RDONLY; | 358 | sb->s_flags |= MS_RDONLY; |
359 | } else if (vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_JOURNALED)) { | 359 | } else if (vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_JOURNALED)) { |
360 | printk(KERN_WARNING "hfs: write access to a jounaled filesystem is not supported, " | 360 | printk(KERN_WARNING "hfs: write access to a journaled filesystem is not supported, " |
361 | "use the force option at your own risk, mounting read-only.\n"); | 361 | "use the force option at your own risk, mounting read-only.\n"); |
362 | sb->s_flags |= MS_RDONLY; | 362 | sb->s_flags |= MS_RDONLY; |
363 | } | 363 | } |
@@ -423,7 +423,7 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent) | |||
423 | */ | 423 | */ |
424 | vhdr->last_mount_vers = cpu_to_be32(HFSP_MOUNT_VERSION); | 424 | vhdr->last_mount_vers = cpu_to_be32(HFSP_MOUNT_VERSION); |
425 | vhdr->modify_date = hfsp_now2mt(); | 425 | vhdr->modify_date = hfsp_now2mt(); |
426 | vhdr->write_count = cpu_to_be32(be32_to_cpu(vhdr->write_count) + 1); | 426 | be32_add_cpu(&vhdr->write_count, 1); |
427 | vhdr->attributes &= cpu_to_be32(~HFSPLUS_VOL_UNMNT); | 427 | vhdr->attributes &= cpu_to_be32(~HFSPLUS_VOL_UNMNT); |
428 | vhdr->attributes |= cpu_to_be32(HFSPLUS_VOL_INCNSTNT); | 428 | vhdr->attributes |= cpu_to_be32(HFSPLUS_VOL_INCNSTNT); |
429 | mark_buffer_dirty(HFSPLUS_SB(sb).s_vhbh); | 429 | mark_buffer_dirty(HFSPLUS_SB(sb).s_vhbh); |
diff --git a/fs/hfsplus/wrapper.c b/fs/hfsplus/wrapper.c index 72cab78f0509..175d08eacc86 100644 --- a/fs/hfsplus/wrapper.c +++ b/fs/hfsplus/wrapper.c | |||
@@ -47,7 +47,7 @@ static int hfsplus_read_mdb(void *bufptr, struct hfsplus_wd *wd) | |||
47 | return 0; | 47 | return 0; |
48 | wd->ablk_start = be16_to_cpu(*(__be16 *)(bufptr + HFSP_WRAPOFF_ABLKSTART)); | 48 | wd->ablk_start = be16_to_cpu(*(__be16 *)(bufptr + HFSP_WRAPOFF_ABLKSTART)); |
49 | 49 | ||
50 | extent = be32_to_cpu(get_unaligned((__be32 *)(bufptr + HFSP_WRAPOFF_EMBEDEXT))); | 50 | extent = get_unaligned_be32(bufptr + HFSP_WRAPOFF_EMBEDEXT); |
51 | wd->embed_start = (extent >> 16) & 0xFFFF; | 51 | wd->embed_start = (extent >> 16) & 0xFFFF; |
52 | wd->embed_count = extent & 0xFFFF; | 52 | wd->embed_count = extent & 0xFFFF; |
53 | 53 | ||