Lines Matching refs:rec_len

115 	unsigned offs, rec_len;  in ext2_check_page()  local
127 for (offs = 0; offs <= limit - EXT2_DIR_REC_LEN(1); offs += rec_len) { in ext2_check_page()
129 rec_len = ext2_rec_len_from_disk(p->rec_len); in ext2_check_page()
131 if (unlikely(rec_len < EXT2_DIR_REC_LEN(1))) in ext2_check_page()
133 if (unlikely(rec_len & 3)) in ext2_check_page()
135 if (unlikely(rec_len < EXT2_DIR_REC_LEN(p->name_len))) in ext2_check_page()
137 if (unlikely(((offs + rec_len - 1) ^ offs) & ~(chunk_size-1))) in ext2_check_page()
176 rec_len, p->name_len); in ext2_check_page()
240 ext2_rec_len_from_disk(p->rec_len)); in ext2_next_entry()
249 if (p->rec_len == 0) in ext2_validate_entry()
306 if (de->rec_len == 0) { in ext2_readdir()
325 ctx->pos += ext2_rec_len_from_disk(de->rec_len); in ext2_readdir()
383 if (de->rec_len == 0) { in ext2_find_entry()
469 unsigned len = ext2_rec_len_from_disk(de->rec_len); in ext2_set_link()
494 unsigned short rec_len, name_len; in ext2_add_link() local
525 rec_len = chunk_size; in ext2_add_link()
526 de->rec_len = ext2_rec_len_to_disk(chunk_size); in ext2_add_link()
530 if (de->rec_len == 0) { in ext2_add_link()
540 rec_len = ext2_rec_len_from_disk(de->rec_len); in ext2_add_link()
541 if (!de->inode && rec_len >= reclen) in ext2_add_link()
543 if (rec_len >= name_len + reclen) in ext2_add_link()
545 de = (ext2_dirent *) ((char *) de + rec_len); in ext2_add_link()
556 err = ext2_prepare_chunk(page, pos, rec_len); in ext2_add_link()
561 de1->rec_len = ext2_rec_len_to_disk(rec_len - name_len); in ext2_add_link()
562 de->rec_len = ext2_rec_len_to_disk(name_len); in ext2_add_link()
569 err = ext2_commit_chunk(page, pos, rec_len); in ext2_add_link()
593 ext2_rec_len_from_disk(dir->rec_len); in ext2_delete_entry()
600 if (de->rec_len == 0) { in ext2_delete_entry()
616 pde->rec_len = ext2_rec_len_to_disk(to - from); in ext2_delete_entry()
649 de->rec_len = ext2_rec_len_to_disk(EXT2_DIR_REC_LEN(1)); in ext2_make_empty()
656 de->rec_len = ext2_rec_len_to_disk(chunk_size - EXT2_DIR_REC_LEN(1)); in ext2_make_empty()
689 if (de->rec_len == 0) { in ext2_empty_dir()