~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to fs/ubifs/find.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
252
252
                 * But if the index takes fewer LEBs than it is reserved for it,
253
253
                 * this function must avoid picking those reserved LEBs.
254
254
                 */
255
 
                if (c->min_idx_lebs >= c->lst.idx_lebs) {
256
 
                        rsvd_idx_lebs = c->min_idx_lebs -  c->lst.idx_lebs;
 
255
                if (c->bi.min_idx_lebs >= c->lst.idx_lebs) {
 
256
                        rsvd_idx_lebs = c->bi.min_idx_lebs -  c->lst.idx_lebs;
257
257
                        exclude_index = 1;
258
258
                }
259
259
                spin_unlock(&c->space_lock);
276
276
                        pick_free = 0;
277
277
        } else {
278
278
                spin_lock(&c->space_lock);
279
 
                exclude_index = (c->min_idx_lebs >= c->lst.idx_lebs);
 
279
                exclude_index = (c->bi.min_idx_lebs >= c->lst.idx_lebs);
280
280
                spin_unlock(&c->space_lock);
281
281
        }
282
282
 
501
501
 
502
502
        /* Check if there are enough empty LEBs for commit */
503
503
        spin_lock(&c->space_lock);
504
 
        if (c->min_idx_lebs > c->lst.idx_lebs)
505
 
                rsvd_idx_lebs = c->min_idx_lebs -  c->lst.idx_lebs;
 
504
        if (c->bi.min_idx_lebs > c->lst.idx_lebs)
 
505
                rsvd_idx_lebs = c->bi.min_idx_lebs -  c->lst.idx_lebs;
506
506
        else
507
507
                rsvd_idx_lebs = 0;
508
508
        lebs = c->lst.empty_lebs + c->freeable_cnt + c->idx_gc_cnt -