diff options
Diffstat (limited to 'fs/ubifs/recovery.c')
-rw-r--r-- | fs/ubifs/recovery.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/fs/ubifs/recovery.c b/fs/ubifs/recovery.c index 1a72046efed5..3e0eedbe49ce 100644 --- a/fs/ubifs/recovery.c +++ b/fs/ubifs/recovery.c | |||
@@ -1127,21 +1127,10 @@ int ubifs_rcvry_gc_commit(struct ubifs_info *c) | |||
1127 | } | 1127 | } |
1128 | 1128 | ||
1129 | ubifs_assert(!(lp.flags & LPROPS_INDEX)); | 1129 | ubifs_assert(!(lp.flags & LPROPS_INDEX)); |
1130 | ubifs_assert(lp.free + lp.dirty >= wbuf->offs); | ||
1130 | lnum = lp.lnum; | 1131 | lnum = lp.lnum; |
1131 | 1132 | ||
1132 | /* | 1133 | /* |
1133 | * There was no empty LEB so the used space in the dirtiest LEB must fit | ||
1134 | * in the GC head LEB. | ||
1135 | */ | ||
1136 | if (lp.free + lp.dirty < wbuf->offs) { | ||
1137 | dbg_rcvry("LEB %d doesn't fit in GC head LEB %d:%d", | ||
1138 | lnum, wbuf->lnum, wbuf->offs); | ||
1139 | err = ubifs_return_leb(c, lnum); | ||
1140 | if (err) | ||
1141 | return err; | ||
1142 | goto find_free; | ||
1143 | } | ||
1144 | /* | ||
1145 | * We run the commit before garbage collection otherwise subsequent | 1134 | * We run the commit before garbage collection otherwise subsequent |
1146 | * mounts will see the GC and orphan deletion in a different order. | 1135 | * mounts will see the GC and orphan deletion in a different order. |
1147 | */ | 1136 | */ |