Lines Matching defs:rev
521 struct aa_revision *rev = file->private_data;
523 if (rev) {
524 aa_put_ns(rev->ns);
525 kfree(rev);
534 struct aa_revision *rev = file->private_data;
539 mutex_lock_nested(&rev->ns->lock, rev->ns->level);
540 last_read = rev->last_read;
541 if (last_read == rev->ns->revision) {
542 mutex_unlock(&rev->ns->lock);
545 if (wait_event_interruptible(rev->ns->wait,
547 READ_ONCE(rev->ns->revision)))
549 mutex_lock_nested(&rev->ns->lock, rev->ns->level);
552 avail = sprintf(buffer, "%ld\n", rev->ns->revision);
554 rev->last_read = rev->ns->revision;
557 mutex_unlock(&rev->ns->lock);
564 struct aa_revision *rev = kzalloc(sizeof(*rev), GFP_KERNEL);
566 if (!rev)
569 rev->ns = aa_get_ns(inode->i_private);
570 if (!rev->ns)
571 rev->ns = aa_get_current_ns();
572 file->private_data = rev;
579 struct aa_revision *rev = file->private_data;
582 if (rev) {
583 mutex_lock_nested(&rev->ns->lock, rev->ns->level);
584 poll_wait(file, &rev->ns->wait, pt);
585 if (rev->last_read < rev->ns->revision)
587 mutex_unlock(&rev->ns->lock);