Lines Matching refs:free_i
22 #define GET_L2R_SEGNO(free_i, segno) ((segno) - (free_i)->start_segno) argument
23 #define GET_R2L_SEGNO(free_i, segno) ((segno) + (free_i)->start_segno) argument
439 static inline unsigned int find_next_inuse(struct free_segmap_info *free_i, in find_next_inuse() argument
443 spin_lock(&free_i->segmap_lock); in find_next_inuse()
444 ret = find_next_bit(free_i->free_segmap, max, segno); in find_next_inuse()
445 spin_unlock(&free_i->segmap_lock); in find_next_inuse()
451 struct free_segmap_info *free_i = FREE_I(sbi); in __set_free() local
457 spin_lock(&free_i->segmap_lock); in __set_free()
458 clear_bit(segno, free_i->free_segmap); in __set_free()
459 free_i->free_segments++; in __set_free()
461 next = find_next_bit(free_i->free_segmap, in __set_free()
464 clear_bit(secno, free_i->free_secmap); in __set_free()
465 free_i->free_sections++; in __set_free()
467 spin_unlock(&free_i->segmap_lock); in __set_free()
473 struct free_segmap_info *free_i = FREE_I(sbi); in __set_inuse() local
476 set_bit(segno, free_i->free_segmap); in __set_inuse()
477 free_i->free_segments--; in __set_inuse()
478 if (!test_and_set_bit(secno, free_i->free_secmap)) in __set_inuse()
479 free_i->free_sections--; in __set_inuse()
485 struct free_segmap_info *free_i = FREE_I(sbi); in __set_test_and_free() local
491 spin_lock(&free_i->segmap_lock); in __set_test_and_free()
492 if (test_and_clear_bit(segno, free_i->free_segmap)) { in __set_test_and_free()
493 free_i->free_segments++; in __set_test_and_free()
497 next = find_next_bit(free_i->free_segmap, in __set_test_and_free()
500 if (test_and_clear_bit(secno, free_i->free_secmap)) in __set_test_and_free()
501 free_i->free_sections++; in __set_test_and_free()
505 spin_unlock(&free_i->segmap_lock); in __set_test_and_free()
511 struct free_segmap_info *free_i = FREE_I(sbi); in __set_test_and_inuse() local
514 spin_lock(&free_i->segmap_lock); in __set_test_and_inuse()
515 if (!test_and_set_bit(segno, free_i->free_segmap)) { in __set_test_and_inuse()
516 free_i->free_segments--; in __set_test_and_inuse()
517 if (!test_and_set_bit(secno, free_i->free_secmap)) in __set_test_and_inuse()
518 free_i->free_sections--; in __set_test_and_inuse()
520 spin_unlock(&free_i->segmap_lock); in __set_test_and_inuse()