diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-30 20:31:56 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-30 20:31:56 -0400 |
commit | 623ff7739e7c00fa3d55dbfd42a492a68298fd7a (patch) | |
tree | 0b7461753a1b13b27ea2958a7d48c6efb47bba54 /fs/jffs2/super.c | |
parent | c39e8ede284f469971589f2e04af78216e1a771d (diff) | |
parent | 7b0e67f604e1829e5292e1ad7743eb18dc42ea7c (diff) |
Merge tag 'for-linus-3.4' of git://git.infradead.org/mtd-2.6
Pull MTD changes from David Woodhouse:
- Artem's cleanup of the MTD API continues apace.
- Fixes and improvements for ST FSMC and SuperH FLCTL NAND, amongst
others.
- More work on DiskOnChip G3, new driver for DiskOnChip G4.
- Clean up debug/warning printks in JFFS2 to use pr_<level>.
Fix up various trivial conflicts, largely due to changes in calling
conventions for things like dmaengine_prep_slave_sg() (new inline
wrapper to hide new parameter, clashing with rewrite of previously last
parameter that used to be an 'append' flag, and is now a bitmap of
'unsigned long flags').
(Also some header file fallout - like so many merges this merge window -
and silly conflicts with sparse fixes)
* tag 'for-linus-3.4' of git://git.infradead.org/mtd-2.6: (120 commits)
mtd: docg3 add protection against concurrency
mtd: docg3 refactor cascade floors structure
mtd: docg3 increase write/erase timeout
mtd: docg3 fix inbound calculations
mtd: nand: gpmi: fix function annotations
mtd: phram: fix section mismatch for phram_setup
mtd: unify initialization of erase_info->fail_addr
mtd: support ONFI multi lun NAND
mtd: sm_ftl: fix typo in major number.
mtd: add device-tree support to spear_smi
mtd: spear_smi: Remove default partition information from driver
mtd: Add device-tree support to fsmc_nand
mtd: fix section mismatch for doc_probe_device
mtd: nand/fsmc: Remove sparse warnings and errors
mtd: nand/fsmc: Add DMA support
mtd: nand/fsmc: Access the NAND device word by word whenever possible
mtd: nand/fsmc: Use dev_err to report error scenario
mtd: nand/fsmc: Use devm routines
mtd: nand/fsmc: Modify fsmc driver to accept nand timing parameters via platform
mtd: fsmc_nand: add pm callbacks to support hibernation
...
Diffstat (limited to 'fs/jffs2/super.c')
-rw-r--r-- | fs/jffs2/super.c | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/fs/jffs2/super.c b/fs/jffs2/super.c index f2d96b5e64f6..f9916f312bd8 100644 --- a/fs/jffs2/super.c +++ b/fs/jffs2/super.c | |||
@@ -9,6 +9,8 @@ | |||
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
13 | |||
12 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
13 | #include <linux/module.h> | 15 | #include <linux/module.h> |
14 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
@@ -69,7 +71,7 @@ static void jffs2_write_super(struct super_block *sb) | |||
69 | sb->s_dirt = 0; | 71 | sb->s_dirt = 0; |
70 | 72 | ||
71 | if (!(sb->s_flags & MS_RDONLY)) { | 73 | if (!(sb->s_flags & MS_RDONLY)) { |
72 | D1(printk(KERN_DEBUG "jffs2_write_super()\n")); | 74 | jffs2_dbg(1, "%s()\n", __func__); |
73 | jffs2_flush_wbuf_gc(c, 0); | 75 | jffs2_flush_wbuf_gc(c, 0); |
74 | } | 76 | } |
75 | 77 | ||
@@ -214,8 +216,8 @@ static int jffs2_parse_options(struct jffs2_sb_info *c, char *data) | |||
214 | JFFS2_COMPR_MODE_FORCEZLIB; | 216 | JFFS2_COMPR_MODE_FORCEZLIB; |
215 | #endif | 217 | #endif |
216 | else { | 218 | else { |
217 | printk(KERN_ERR "JFFS2 Error: unknown compressor \"%s\"", | 219 | pr_err("Error: unknown compressor \"%s\"\n", |
218 | name); | 220 | name); |
219 | kfree(name); | 221 | kfree(name); |
220 | return -EINVAL; | 222 | return -EINVAL; |
221 | } | 223 | } |
@@ -223,8 +225,8 @@ static int jffs2_parse_options(struct jffs2_sb_info *c, char *data) | |||
223 | c->mount_opts.override_compr = true; | 225 | c->mount_opts.override_compr = true; |
224 | break; | 226 | break; |
225 | default: | 227 | default: |
226 | printk(KERN_ERR "JFFS2 Error: unrecognized mount option '%s' or missing value\n", | 228 | pr_err("Error: unrecognized mount option '%s' or missing value\n", |
227 | p); | 229 | p); |
228 | return -EINVAL; | 230 | return -EINVAL; |
229 | } | 231 | } |
230 | } | 232 | } |
@@ -266,9 +268,9 @@ static int jffs2_fill_super(struct super_block *sb, void *data, int silent) | |||
266 | struct jffs2_sb_info *c; | 268 | struct jffs2_sb_info *c; |
267 | int ret; | 269 | int ret; |
268 | 270 | ||
269 | D1(printk(KERN_DEBUG "jffs2_get_sb_mtd():" | 271 | jffs2_dbg(1, "jffs2_get_sb_mtd():" |
270 | " New superblock for device %d (\"%s\")\n", | 272 | " New superblock for device %d (\"%s\")\n", |
271 | sb->s_mtd->index, sb->s_mtd->name)); | 273 | sb->s_mtd->index, sb->s_mtd->name); |
272 | 274 | ||
273 | c = kzalloc(sizeof(*c), GFP_KERNEL); | 275 | c = kzalloc(sizeof(*c), GFP_KERNEL); |
274 | if (!c) | 276 | if (!c) |
@@ -315,7 +317,7 @@ static void jffs2_put_super (struct super_block *sb) | |||
315 | { | 317 | { |
316 | struct jffs2_sb_info *c = JFFS2_SB_INFO(sb); | 318 | struct jffs2_sb_info *c = JFFS2_SB_INFO(sb); |
317 | 319 | ||
318 | D2(printk(KERN_DEBUG "jffs2: jffs2_put_super()\n")); | 320 | jffs2_dbg(2, "%s()\n", __func__); |
319 | 321 | ||
320 | if (sb->s_dirt) | 322 | if (sb->s_dirt) |
321 | jffs2_write_super(sb); | 323 | jffs2_write_super(sb); |
@@ -336,7 +338,7 @@ static void jffs2_put_super (struct super_block *sb) | |||
336 | kfree(c->inocache_list); | 338 | kfree(c->inocache_list); |
337 | jffs2_clear_xattr_subsystem(c); | 339 | jffs2_clear_xattr_subsystem(c); |
338 | mtd_sync(c->mtd); | 340 | mtd_sync(c->mtd); |
339 | D1(printk(KERN_DEBUG "jffs2_put_super returning\n")); | 341 | jffs2_dbg(1, "%s(): returning\n", __func__); |
340 | } | 342 | } |
341 | 343 | ||
342 | static void jffs2_kill_sb(struct super_block *sb) | 344 | static void jffs2_kill_sb(struct super_block *sb) |
@@ -371,7 +373,7 @@ static int __init init_jffs2_fs(void) | |||
371 | BUILD_BUG_ON(sizeof(struct jffs2_raw_inode) != 68); | 373 | BUILD_BUG_ON(sizeof(struct jffs2_raw_inode) != 68); |
372 | BUILD_BUG_ON(sizeof(struct jffs2_raw_summary) != 32); | 374 | BUILD_BUG_ON(sizeof(struct jffs2_raw_summary) != 32); |
373 | 375 | ||
374 | printk(KERN_INFO "JFFS2 version 2.2." | 376 | pr_info("version 2.2." |
375 | #ifdef CONFIG_JFFS2_FS_WRITEBUFFER | 377 | #ifdef CONFIG_JFFS2_FS_WRITEBUFFER |
376 | " (NAND)" | 378 | " (NAND)" |
377 | #endif | 379 | #endif |
@@ -386,22 +388,22 @@ static int __init init_jffs2_fs(void) | |||
386 | SLAB_MEM_SPREAD), | 388 | SLAB_MEM_SPREAD), |
387 | jffs2_i_init_once); | 389 | jffs2_i_init_once); |
388 | if (!jffs2_inode_cachep) { | 390 | if (!jffs2_inode_cachep) { |
389 | printk(KERN_ERR "JFFS2 error: Failed to initialise inode cache\n"); | 391 | pr_err("error: Failed to initialise inode cache\n"); |
390 | return -ENOMEM; | 392 | return -ENOMEM; |
391 | } | 393 | } |
392 | ret = jffs2_compressors_init(); | 394 | ret = jffs2_compressors_init(); |
393 | if (ret) { | 395 | if (ret) { |
394 | printk(KERN_ERR "JFFS2 error: Failed to initialise compressors\n"); | 396 | pr_err("error: Failed to initialise compressors\n"); |
395 | goto out; | 397 | goto out; |
396 | } | 398 | } |
397 | ret = jffs2_create_slab_caches(); | 399 | ret = jffs2_create_slab_caches(); |
398 | if (ret) { | 400 | if (ret) { |
399 | printk(KERN_ERR "JFFS2 error: Failed to initialise slab caches\n"); | 401 | pr_err("error: Failed to initialise slab caches\n"); |
400 | goto out_compressors; | 402 | goto out_compressors; |
401 | } | 403 | } |
402 | ret = register_filesystem(&jffs2_fs_type); | 404 | ret = register_filesystem(&jffs2_fs_type); |
403 | if (ret) { | 405 | if (ret) { |
404 | printk(KERN_ERR "JFFS2 error: Failed to register filesystem\n"); | 406 | pr_err("error: Failed to register filesystem\n"); |
405 | goto out_slab; | 407 | goto out_slab; |
406 | } | 408 | } |
407 | return 0; | 409 | return 0; |