Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 335658
b: refs/heads/master
c: a28ad42
h: refs/heads/master
v: v3
  • Loading branch information
Artem Bityutskiy committed Oct 26, 2012
1 parent 5cf8cfc commit 89fc0af
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 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: 98a1eebda3cb2a84ecf1f219bb3a95769033d1bf
refs/heads/master: a28ad42a4a0c6f302f488f26488b8b37c9b30024
12 changes: 10 additions & 2 deletions trunk/fs/ubifs/find.c
Original file line number Diff line number Diff line change
Expand Up @@ -681,8 +681,16 @@ int ubifs_find_free_leb_for_idx(struct ubifs_info *c)
if (!lprops) {
lprops = ubifs_fast_find_freeable(c);
if (!lprops) {
ubifs_assert(c->freeable_cnt == 0);
if (c->lst.empty_lebs - c->lst.taken_empty_lebs > 0) {
/*
* The first condition means the following: go scan the
* LPT if there are uncategorized lprops, which means
* there may be freeable LEBs there (UBIFS does not
* store the information about freeable LEBs in the
* master node).
*/
if (c->in_a_category_cnt != c->main_lebs ||
c->lst.empty_lebs - c->lst.taken_empty_lebs > 0) {
ubifs_assert(c->freeable_cnt == 0);
lprops = scan_for_leb_for_idx(c);
if (IS_ERR(lprops)) {
err = PTR_ERR(lprops);
Expand Down

0 comments on commit 89fc0af

Please sign in to comment.