Lines Matching refs:ex

63 	struct dev_exception_item *ex, *tmp, *new;
67 list_for_each_entry(ex, orig, list) {
68 new = kmemdup(ex, sizeof(*ex), GFP_KERNEL);
77 list_for_each_entry_safe(ex, tmp, dest, list) {
78 list_del(&ex->list);
79 kfree(ex);
86 struct dev_exception_item *ex, *tmp;
90 list_for_each_entry_safe(ex, tmp, orig, list) {
91 list_move_tail(&ex->list, dest);
99 struct dev_exception_item *ex)
105 excopy = kmemdup(ex, sizeof(*ex), GFP_KERNEL);
110 if (walk->type != ex->type)
112 if (walk->major != ex->major)
114 if (walk->minor != ex->minor)
117 walk->access |= ex->access;
131 struct dev_exception_item *ex)
138 if (walk->type != ex->type)
140 if (walk->major != ex->major)
142 if (walk->minor != ex->minor)
145 walk->access &= ~ex->access;
155 struct dev_exception_item *ex, *tmp;
157 list_for_each_entry_safe(ex, tmp, &dev_cgroup->exceptions, list) {
158 list_del_rcu(&ex->list);
159 kfree_rcu(ex, rcu);
283 struct dev_exception_item *ex;
300 list_for_each_entry_rcu(ex, &devcgroup->exceptions, list) {
301 set_access(acc, ex->access);
302 set_majmin(maj, ex->major);
303 set_majmin(min, ex->minor);
304 seq_printf(m, "%c %s:%s %s\n", type_to_char(ex->type),
329 struct dev_exception_item *ex;
331 list_for_each_entry_rcu(ex, exceptions, list) {
332 if ((type & DEVCG_DEV_BLOCK) && !(ex->type & DEVCG_DEV_BLOCK))
334 if ((type & DEVCG_DEV_CHAR) && !(ex->type & DEVCG_DEV_CHAR))
336 if (ex->major != ~0 && ex->major != major)
338 if (ex->minor != ~0 && ex->minor != minor)
341 if (access & (~ex->access))
366 struct dev_exception_item *ex;
368 list_for_each_entry_rcu(ex, exceptions, list,
370 if ((type & DEVCG_DEV_BLOCK) && !(ex->type & DEVCG_DEV_BLOCK))
372 if ((type & DEVCG_DEV_CHAR) && !(ex->type & DEVCG_DEV_CHAR))
378 if (ex->major != ~0 && major != ~0 && ex->major != major)
380 if (ex->minor != ~0 && minor != ~0 && ex->minor != minor)
387 if (!(access & ex->access))
462 struct dev_exception_item *ex)
468 return verify_new_ex(parent, ex, childcg->behavior);
474 * @ex: exception being removed
483 struct dev_exception_item *ex)
498 return !match_exception_partial(&parent->exceptions, ex->type,
499 ex->major, ex->minor, ex->access);
530 struct dev_exception_item *ex;
534 ex = container_of(this, struct dev_exception_item, list);
535 if (!parent_has_perm(devcg, ex))
536 dev_exception_rm(devcg, ex);
543 * @ex: new exception to be propagated
548 struct dev_exception_item *ex)
575 rc = dev_exception_add(devcg, ex);
585 dev_exception_rm(devcg, ex);
615 struct dev_exception_item ex;
622 memset(&ex, 0, sizeof(ex));
669 ex.type = DEVCG_DEV_BLOCK;
672 ex.type = DEVCG_DEV_CHAR;
682 ex.major = ~0;
692 rc = kstrtou32(temp, 10, &ex.major);
704 ex.minor = ~0;
714 rc = kstrtou32(temp, 10, &ex.minor);
725 ex.access |= DEVCG_ACC_READ;
728 ex.access |= DEVCG_ACC_WRITE;
731 ex.access |= DEVCG_ACC_MKNOD;
751 if (!parent_allows_removal(devcgroup, &ex))
753 dev_exception_rm(devcgroup, &ex);
757 if (!parent_has_perm(devcgroup, &ex))
759 rc = dev_exception_add(devcgroup, &ex);
768 dev_exception_rm(devcgroup, &ex);
770 rc = dev_exception_add(devcgroup, &ex);
775 rc = propagate_exception(devcgroup, &ex);