aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ubifs/replay.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/fs/ubifs/replay.c b/fs/ubifs/replay.c
index 7df04ba4878e..eed0fcff8d73 100644
--- a/fs/ubifs/replay.c
+++ b/fs/ubifs/replay.c
@@ -1013,7 +1013,6 @@ out:
1013int ubifs_replay_journal(struct ubifs_info *c) 1013int ubifs_replay_journal(struct ubifs_info *c)
1014{ 1014{
1015 int err, i, lnum, offs, free; 1015 int err, i, lnum, offs, free;
1016 void *sbuf = NULL;
1017 1016
1018 BUILD_BUG_ON(UBIFS_TRUN_KEY > 5); 1017 BUILD_BUG_ON(UBIFS_TRUN_KEY > 5);
1019 1018
@@ -1028,10 +1027,6 @@ int ubifs_replay_journal(struct ubifs_info *c)
1028 return -EINVAL; 1027 return -EINVAL;
1029 } 1028 }
1030 1029
1031 sbuf = vmalloc(c->leb_size);
1032 if (!sbuf)
1033 return -ENOMEM;
1034
1035 dbg_mnt("start replaying the journal"); 1030 dbg_mnt("start replaying the journal");
1036 c->replaying = 1; 1031 c->replaying = 1;
1037 lnum = c->ltail_lnum = c->lhead_lnum; 1032 lnum = c->ltail_lnum = c->lhead_lnum;
@@ -1046,7 +1041,7 @@ int ubifs_replay_journal(struct ubifs_info *c)
1046 lnum = UBIFS_LOG_LNUM; 1041 lnum = UBIFS_LOG_LNUM;
1047 offs = 0; 1042 offs = 0;
1048 } 1043 }
1049 err = replay_log_leb(c, lnum, offs, sbuf); 1044 err = replay_log_leb(c, lnum, offs, c->sbuf);
1050 if (err == 1) 1045 if (err == 1)
1051 /* We hit the end of the log */ 1046 /* We hit the end of the log */
1052 break; 1047 break;
@@ -1079,7 +1074,6 @@ int ubifs_replay_journal(struct ubifs_info *c)
1079out: 1074out:
1080 destroy_replay_tree(c); 1075 destroy_replay_tree(c);
1081 destroy_bud_list(c); 1076 destroy_bud_list(c);
1082 vfree(sbuf);
1083 c->replaying = 0; 1077 c->replaying = 0;
1084 return err; 1078 return err;
1085} 1079}