Commit f4673d6f authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'upstream-3.6-rc3' of git://git.infradead.org/linux-ubifs

Pull UBIFS fixes from Artem Bityutskiy:
 - Fix crash on error which prevents emulated power-cut testing.
 - Fix log reply regression introduced in 3.6-rc1.
 - Fix UBIFS complaints about too small debug buffer size which.
 - Fix error message spelling, and remove incorrect commentary.

* tag 'upstream-3.6-rc3' of git://git.infradead.org/linux-ubifs:
  UBIFS: fix error messages spelling
  UBIFS: fix complaints about too small debug buffer size
  UBIFS: fix replay regression
  UBIFS: fix crash on error path
  UBIFS: remove stale commentary
parents 270868f6 69f90258
...@@ -167,7 +167,7 @@ struct ubifs_global_debug_info { ...@@ -167,7 +167,7 @@ struct ubifs_global_debug_info {
#define ubifs_dbg_msg(type, fmt, ...) \ #define ubifs_dbg_msg(type, fmt, ...) \
pr_debug("UBIFS DBG " type ": " fmt "\n", ##__VA_ARGS__) pr_debug("UBIFS DBG " type ": " fmt "\n", ##__VA_ARGS__)
#define DBG_KEY_BUF_LEN 32 #define DBG_KEY_BUF_LEN 48
#define ubifs_dbg_msg_key(type, key, fmt, ...) do { \ #define ubifs_dbg_msg_key(type, key, fmt, ...) do { \
char __tmp_key_buf[DBG_KEY_BUF_LEN]; \ char __tmp_key_buf[DBG_KEY_BUF_LEN]; \
pr_debug("UBIFS DBG " type ": " fmt "%s\n", ##__VA_ARGS__, \ pr_debug("UBIFS DBG " type ": " fmt "%s\n", ##__VA_ARGS__, \
......
...@@ -1749,6 +1749,9 @@ int ubifs_lpt_init(struct ubifs_info *c, int rd, int wr) ...@@ -1749,6 +1749,9 @@ int ubifs_lpt_init(struct ubifs_info *c, int rd, int wr)
return 0; return 0;
out_err: out_err:
if (wr)
ubifs_lpt_free(c, 1);
if (rd)
ubifs_lpt_free(c, 0); ubifs_lpt_free(c, 0);
return err; return err;
} }
......
...@@ -788,7 +788,7 @@ struct ubifs_scan_leb *ubifs_recover_leb(struct ubifs_info *c, int lnum, ...@@ -788,7 +788,7 @@ struct ubifs_scan_leb *ubifs_recover_leb(struct ubifs_info *c, int lnum,
corrupted_rescan: corrupted_rescan:
/* Re-scan the corrupted data with verbose messages */ /* Re-scan the corrupted data with verbose messages */
ubifs_err("corruptio %d", ret); ubifs_err("corruption %d", ret);
ubifs_scan_a_node(c, buf, len, lnum, offs, 1); ubifs_scan_a_node(c, buf, len, lnum, offs, 1);
corrupted: corrupted:
ubifs_scanned_corruption(c, lnum, offs, buf); ubifs_scanned_corruption(c, lnum, offs, buf);
......
...@@ -1026,7 +1026,6 @@ int ubifs_replay_journal(struct ubifs_info *c) ...@@ -1026,7 +1026,6 @@ int ubifs_replay_journal(struct ubifs_info *c)
c->replaying = 1; c->replaying = 1;
lnum = c->ltail_lnum = c->lhead_lnum; lnum = c->ltail_lnum = c->lhead_lnum;
lnum = UBIFS_LOG_LNUM;
do { do {
err = replay_log_leb(c, lnum, 0, c->sbuf); err = replay_log_leb(c, lnum, 0, c->sbuf);
if (err == 1) if (err == 1)
...@@ -1035,7 +1034,7 @@ int ubifs_replay_journal(struct ubifs_info *c) ...@@ -1035,7 +1034,7 @@ int ubifs_replay_journal(struct ubifs_info *c)
if (err) if (err)
goto out; goto out;
lnum = ubifs_next_log_lnum(c, lnum); lnum = ubifs_next_log_lnum(c, lnum);
} while (lnum != UBIFS_LOG_LNUM); } while (lnum != c->ltail_lnum);
err = replay_buds(c); err = replay_buds(c);
if (err) if (err)
......
...@@ -1157,9 +1157,6 @@ static int check_free_space(struct ubifs_info *c) ...@@ -1157,9 +1157,6 @@ static int check_free_space(struct ubifs_info *c)
* *
* This function mounts UBIFS file system. Returns zero in case of success and * This function mounts UBIFS file system. Returns zero in case of success and
* a negative error code in case of failure. * a negative error code in case of failure.
*
* Note, the function does not de-allocate resources it it fails half way
* through, and the caller has to do this instead.
*/ */
static int mount_ubifs(struct ubifs_info *c) static int mount_ubifs(struct ubifs_info *c)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment