diff options
author | Adrian Hunter <ext-adrian.hunter@nokia.com> | 2008-11-05 09:09:04 -0500 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2008-11-07 05:11:52 -0500 |
commit | 7e2d9bfa4eabee3e1919a40f20d2ef8b569bd07e (patch) | |
tree | e79bfe087b5eea815bd584637fab1b14d357c9b1 /fs/ubifs | |
parent | e84461ad9c4f0ff91ab8553596acdb7bf5522df4 (diff) |
UBIFS: allow for gaps when dirtying the LPT
The LPT may have gaps in it because initially empty LEBs
are not added by mkfs.ubifs - because it does not know how
many there are. Then UBIFS allocates empty LEBs in the
reverse order that they are discovered i.e. they are
added to, and removed from, the front of a list. That
creates a gap in the middle of the LPT.
The function dirtying the LPT tree (for the purpose of
small model garbage collection) assumed that a gap could
only occur at the very end of the LPT and stopped dirtying
prematurely, which in turn resulted in the LPT running
out of space - something that is designed to be impossible.
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Diffstat (limited to 'fs/ubifs')
-rw-r--r-- | fs/ubifs/lpt_commit.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/ubifs/lpt_commit.c b/fs/ubifs/lpt_commit.c index eed5a0025d63..a41434b42785 100644 --- a/fs/ubifs/lpt_commit.c +++ b/fs/ubifs/lpt_commit.c | |||
@@ -571,8 +571,6 @@ static struct ubifs_pnode *next_pnode(struct ubifs_info *c, | |||
571 | /* We assume here that LEB zero is never an LPT LEB */ | 571 | /* We assume here that LEB zero is never an LPT LEB */ |
572 | if (nnode->nbranch[iip].lnum) | 572 | if (nnode->nbranch[iip].lnum) |
573 | return ubifs_get_pnode(c, nnode, iip); | 573 | return ubifs_get_pnode(c, nnode, iip); |
574 | else | ||
575 | return NULL; | ||
576 | } | 574 | } |
577 | 575 | ||
578 | /* Go up while can't go right */ | 576 | /* Go up while can't go right */ |