if (rc)
goto out;
- rc = ebitmap_set_bit(&p->filename_trans_ttypes, ttype, 1);
- if (rc)
- return rc;
-
- p->filename_trans_count += ndatum;
- return 0;
+ return ebitmap_set_bit(&p->filename_trans_ttypes, ttype, 1);
out:
kfree(ft);
nel = le32_to_cpu(buf[0]);
if (p->policyvers < POLICYDB_VERSION_COMP_FTRANS) {
- p->filename_trans_count = nel;
+ p->compat_filename_trans_count = nel;
p->filename_trans = hashtab_create(filenametr_hash,
filenametr_cmp, (1 << 11));
if (!p->filename_trans)
return 0;
if (p->policyvers < POLICYDB_VERSION_COMP_FTRANS) {
- buf[0] = cpu_to_le32(p->filename_trans_count);
+ buf[0] = cpu_to_le32(p->compat_filename_trans_count);
rc = put_entry(buf, sizeof(u32), 1, fp);
if (rc)
return rc;
struct ebitmap filename_trans_ttypes;
/* actual set of filename_trans rules */
struct hashtab *filename_trans;
- u32 filename_trans_count;
+ /* only used if policyvers < POLICYDB_VERSION_COMP_FTRANS */
+ u32 compat_filename_trans_count;
/* bools indexed by (value - 1) */
struct cond_bool_datum **bool_val_to_struct;