Lines Matching defs:nir
661 static void ntfs_insert_rb(struct ntfs_index_ra *nir, struct rb_root *root)
669 if (nir->start_index < cnir->start_index)
671 else if (nir->start_index >= cnir->start_index + cnir->count)
674 pr_err("nir start index : %ld, count : %d, cnir start_index : %ld, count : %d\n",
675 nir->start_index, nir->count, cnir->start_index, cnir->count);
680 rb_link_node(&nir->rb_node, parent, new);
681 rb_insert_color(&nir->rb_node, root);
725 struct ntfs_index_ra *nir = NULL;
902 if (nir) {
906 if (nir->start_index <= index &&
907 index < nir->start_index + nir->count) {
931 if (nir->start_index + nir->count == index) {
932 nir->count++;
933 } else if (!nir->start_index && nir->start_index - 1 == index) {
934 nir->start_index = index;
935 } else if (nir->count > 2) {
936 ntfs_insert_rb(nir, &ra_root);
937 nir = NULL;
939 nir->start_index = index;
940 nir->count = 1;
944 if (!nir) {
945 nir = kzalloc(sizeof(struct ntfs_index_ra), GFP_KERNEL);
946 if (nir) {
947 nir->start_index = index;
948 nir->count = 1;
1004 kfree(nir);