my_table[slot - delete_slot] = table->snap_items[slot].index;
}
next_ind = snap_get_indirect
- (primary, my_table, table->tbl_count - delete_slot );
+ (primary, my_table, table->tbl_count - delete_slot );
if (next_ind && (next_ind->i_ino == primary->i_ino)) {
iput(next_ind);
next_ind = NULL;
table = &snap_tables[tableno];
for ( slot = 0 ; slot < SNAP_MAX ; slot++ ) {
- if(strncmp (&table->snap_items[slot].name[0], name,
- SNAP_MAX_NAMELEN) == 0 ) {
+ if (!strcmp(&table->snap_items[slot].name[0], name)) {
return table->snap_items[slot].index;
}
}
sb = cache->cache_sb;
table = &snap_tables[tableno];
- index = get_index_of_item(table, data->snaps[0].name);
+ index = snap_get_index_from_name(tableno, data->snaps[0].name);
if (index < 0)
RETURN(-EINVAL);