Lines Matching refs:nr_bhs
46 if (fatent->nr_bhs == 1) { in fat12_ent_set_ptr()
82 fatent->nr_bhs = 1; in fat12_ent_bread()
89 fatent->nr_bhs = 2; in fat12_ent_bread()
115 fatent->nr_bhs = 1; in fat_ent_bread()
174 if (fatent->nr_bhs == 2) in fat12_ent_put()
202 if (fatent->nr_bhs == 1) { in fat12_ent_next()
220 fatent->nr_bhs = 1; in fat12_ent_next()
328 if (!fatent->nr_bhs || bhs[0]->b_blocknr != blocknr) in fat_ent_update_ptr()
333 if (fatent->nr_bhs == 2) { in fat_ent_update_ptr()
335 fatent->nr_bhs = 1; in fat_ent_update_ptr()
339 if (fatent->nr_bhs != 2) in fat_ent_update_ptr()
377 int nr_bhs) in fat_mirror_bhs() argument
387 for (n = 0; n < nr_bhs; n++) { in fat_mirror_bhs()
419 err = fat_sync_bhs(fatent->bhs, fatent->nr_bhs); in fat_ent_write()
423 return fat_mirror_bhs(sb, fatent->bhs, fatent->nr_bhs); in fat_ent_write()
448 static void fat_collect_bhs(struct buffer_head **bhs, int *nr_bhs, in fat_collect_bhs() argument
453 for (n = 0; n < fatent->nr_bhs; n++) { in fat_collect_bhs()
454 for (i = 0; i < *nr_bhs; i++) { in fat_collect_bhs()
458 if (i == *nr_bhs) { in fat_collect_bhs()
461 (*nr_bhs)++; in fat_collect_bhs()
473 int i, count, err, nr_bhs, idx_clus; in fat_alloc_clusters() local
484 err = nr_bhs = idx_clus = 0; in fat_alloc_clusters()
504 if (prev_ent.nr_bhs) in fat_alloc_clusters()
507 fat_collect_bhs(bhs, &nr_bhs, &fatent); in fat_alloc_clusters()
541 err = fat_sync_bhs(bhs, nr_bhs); in fat_alloc_clusters()
543 err = fat_mirror_bhs(sb, bhs, nr_bhs); in fat_alloc_clusters()
545 for (i = 0; i < nr_bhs; i++) in fat_alloc_clusters()
561 int i, err, nr_bhs; in fat_free_clusters() local
564 nr_bhs = 0; in fat_free_clusters()
603 if (nr_bhs + fatent.nr_bhs > MAX_BUF_PER_PAGE) { in fat_free_clusters()
605 err = fat_sync_bhs(bhs, nr_bhs); in fat_free_clusters()
609 err = fat_mirror_bhs(sb, bhs, nr_bhs); in fat_free_clusters()
612 for (i = 0; i < nr_bhs; i++) in fat_free_clusters()
614 nr_bhs = 0; in fat_free_clusters()
616 fat_collect_bhs(bhs, &nr_bhs, &fatent); in fat_free_clusters()
620 err = fat_sync_bhs(bhs, nr_bhs); in fat_free_clusters()
624 err = fat_mirror_bhs(sb, bhs, nr_bhs); in fat_free_clusters()
627 for (i = 0; i < nr_bhs; i++) in fat_free_clusters()