summaryrefslogtreecommitdiffstats
path: root/fs/ubifs/budget.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ubifs/budget.c')
-rw-r--r--fs/ubifs/budget.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/fs/ubifs/budget.c b/fs/ubifs/budget.c
index d5a6503..e423425 100644
--- a/fs/ubifs/budget.c
+++ b/fs/ubifs/budget.c
@@ -280,13 +280,8 @@ int ubifs_calc_min_idx_lebs(struct ubifs_info *c)
* extra LEB to compensate.
*/
ret += 1;
- /*
- * At present the index needs at least 2 LEBs: one for the index head
- * and one for in-the-gaps method (which currently does not cater for
- * the index head and so excludes it from consideration).
- */
- if (ret < 2)
- ret = 2;
+ if (ret < MIN_INDEX_LEBS)
+ ret = MIN_INDEX_LEBS;
return ret;
}
OpenPOWER on IntegriCloud