Skip to content

Commit

Permalink
UBIFS: avoid unnecessary calculations
Browse files Browse the repository at this point in the history
Do not calculate min_idx_lebs, because it is available in
c->min_idx_lebs

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
  • Loading branch information
Artem Bityutskiy authored and Artem Bityutskiy committed Dec 23, 2008
1 parent 650ed50 commit c8f9159
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/ubifs/budget.c
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,8 @@ long long ubifs_get_free_space(struct ubifs_info *c)
long long available, outstanding, free;

spin_lock(&c->space_lock);
min_idx_lebs = ubifs_calc_min_idx_lebs(c);
min_idx_lebs = c->min_idx_lebs;
ubifs_assert(min_idx_lebs == ubifs_calc_min_idx_lebs(c));
outstanding = c->budg_data_growth + c->budg_dd_growth;

/*
Expand Down

0 comments on commit c8f9159

Please sign in to comment.