Lines Matching refs:ex

64 	struct dev_exception_item *ex, *tmp, *new;
68 list_for_each_entry(ex, orig, list) {
69 new = kmemdup(ex, sizeof(*ex), GFP_KERNEL);
78 list_for_each_entry_safe(ex, tmp, dest, list) {
79 list_del(&ex->list);
80 kfree(ex);
87 struct dev_exception_item *ex, *tmp;
91 list_for_each_entry_safe(ex, tmp, orig, list) {
92 list_move_tail(&ex->list, dest);
100 struct dev_exception_item *ex)
106 excopy = kmemdup(ex, sizeof(*ex), GFP_KERNEL);
111 if (walk->type != ex->type)
113 if (walk->major != ex->major)
115 if (walk->minor != ex->minor)
118 walk->access |= ex->access;
132 struct dev_exception_item *ex)
139 if (walk->type != ex->type)
141 if (walk->major != ex->major)
143 if (walk->minor != ex->minor)
146 walk->access &= ~ex->access;
156 struct dev_exception_item *ex, *tmp;
158 list_for_each_entry_safe(ex, tmp, &dev_cgroup->exceptions, list) {
159 list_del_rcu(&ex->list);
160 kfree_rcu(ex, rcu);
284 struct dev_exception_item *ex;
301 list_for_each_entry_rcu(ex, &devcgroup->exceptions, list) {
302 set_access(acc, ex->access);
303 set_majmin(maj, ex->major);
304 set_majmin(min, ex->minor);
305 seq_printf(m, "%c %s:%s %s\n", type_to_char(ex->type),
330 struct dev_exception_item *ex;
332 list_for_each_entry_rcu(ex, exceptions, list) {
333 if ((type & DEVCG_DEV_BLOCK) && !(ex->type & DEVCG_DEV_BLOCK))
335 if ((type & DEVCG_DEV_CHAR) && !(ex->type & DEVCG_DEV_CHAR))
337 if (ex->major != ~0 && ex->major != major)
339 if (ex->minor != ~0 && ex->minor != minor)
342 if (access & (~ex->access))
367 struct dev_exception_item *ex;
369 list_for_each_entry_rcu(ex, exceptions, list,
371 if ((type & DEVCG_DEV_BLOCK) && !(ex->type & DEVCG_DEV_BLOCK))
373 if ((type & DEVCG_DEV_CHAR) && !(ex->type & DEVCG_DEV_CHAR))
379 if (ex->major != ~0 && major != ~0 && ex->major != major)
381 if (ex->minor != ~0 && minor != ~0 && ex->minor != minor)
388 if (!(access & ex->access))
463 struct dev_exception_item *ex)
469 return verify_new_ex(parent, ex, childcg->behavior);
475 * @ex: exception being removed
484 struct dev_exception_item *ex)
499 return !match_exception_partial(&parent->exceptions, ex->type,
500 ex->major, ex->minor, ex->access);
531 struct dev_exception_item *ex;
535 ex = container_of(this, struct dev_exception_item, list);
536 if (!parent_has_perm(devcg, ex))
537 dev_exception_rm(devcg, ex);
544 * @ex: new exception to be propagated
549 struct dev_exception_item *ex)
576 rc = dev_exception_add(devcg, ex);
586 dev_exception_rm(devcg, ex);
616 struct dev_exception_item ex;
623 memset(&ex, 0, sizeof(ex));
670 ex.type = DEVCG_DEV_BLOCK;
673 ex.type = DEVCG_DEV_CHAR;
683 ex.major = ~0;
693 rc = kstrtou32(temp, 10, &ex.major);
705 ex.minor = ~0;
715 rc = kstrtou32(temp, 10, &ex.minor);
726 ex.access |= DEVCG_ACC_READ;
729 ex.access |= DEVCG_ACC_WRITE;
732 ex.access |= DEVCG_ACC_MKNOD;
752 if (!parent_allows_removal(devcgroup, &ex))
754 dev_exception_rm(devcgroup, &ex);
758 if (!parent_has_perm(devcgroup, &ex))
760 rc = dev_exception_add(devcgroup, &ex);
769 dev_exception_rm(devcgroup, &ex);
771 rc = dev_exception_add(devcgroup, &ex);
776 rc = propagate_exception(devcgroup, &ex);