/* Returns true if @filename is specified by "deny_rewrite" directive, false otherwise.  */
static bool tomoyo_is_no_rewrite_file(const struct tomoyo_path_info *filename)
/* Returns true if @filename is specified by "deny_rewrite" directive, false otherwise.  */
static bool tomoyo_is_no_rewrite_file(const struct tomoyo_path_info *filename)
{
	struct tomoyo_no_rewrite_entry *ptr;
	bool found = false;
	down_read(&tomoyo_no_rewrite_list_lock);
	list_for_each_entry(ptr, &tomoyo_no_rewrite_list, list) {
		if (ptr->is_deleted)
			continue;
		if (!tomoyo_path_matches_pattern(filename, ptr->pattern))
			continue;
		found = true;
		break;
	}
	up_read(&tomoyo_no_rewrite_list_lock);
	return found;
}