Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 250443
b: refs/heads/master
c: 8ca5175
h: refs/heads/master
i:
  250441: 92cc047
  250439: f885bee
v: v3
  • Loading branch information
Artem Bityutskiy authored and Artem Bityutskiy committed May 16, 2011
1 parent 90afac6 commit f394a38
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 25 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: eaeee242c531cd4b0a4a46e8b5dd7ef504380c42
refs/heads/master: 8ca5175b02b77178a70cbb9fd7020c4938e3d3a6
42 changes: 18 additions & 24 deletions trunk/fs/ubifs/lprops.c
Original file line number Diff line number Diff line change
Expand Up @@ -1100,32 +1100,26 @@ static int scan_check_cb(struct ubifs_info *c,
goto out;
}

/*
* After an unclean unmount, empty and freeable LEBs
* may contain garbage - do not scan them.
*/
if (lp->free == c->leb_size) {
lst->empty_lebs += 1;
lst->total_free += c->leb_size;
lst->total_dark += ubifs_calc_dark(c, c->leb_size);
return LPT_SCAN_CONTINUE;
}
if (lp->free + lp->dirty == c->leb_size &&
!(lp->flags & LPROPS_INDEX)) {
lst->total_free += lp->free;
lst->total_dirty += lp->dirty;
lst->total_dark += ubifs_calc_dark(c, c->leb_size);
return LPT_SCAN_CONTINUE;
}

sleb = ubifs_scan(c, lnum, 0, buf, 0);
if (IS_ERR(sleb)) {
/*
* After an unclean unmount, empty and freeable LEBs
* may contain garbage.
*/
if (lp->free == c->leb_size) {
ubifs_err("scan errors were in empty LEB "
"- continuing checking");
lst->empty_lebs += 1;
lst->total_free += c->leb_size;
lst->total_dark += ubifs_calc_dark(c, c->leb_size);
ret = LPT_SCAN_CONTINUE;
goto exit;
}

if (lp->free + lp->dirty == c->leb_size &&
!(lp->flags & LPROPS_INDEX)) {
ubifs_err("scan errors were in freeable LEB "
"- continuing checking");
lst->total_free += lp->free;
lst->total_dirty += lp->dirty;
lst->total_dark += ubifs_calc_dark(c, c->leb_size);
ret = LPT_SCAN_CONTINUE;
goto exit;
}
data->err = PTR_ERR(sleb);
ret = LPT_SCAN_STOP;
goto exit;
Expand Down

0 comments on commit f394a38

Please sign in to comment.