Lines Matching defs:rev
525 struct aa_revision *rev = file->private_data;
527 if (rev) {
528 aa_put_ns(rev->ns);
529 kfree(rev);
538 struct aa_revision *rev = file->private_data;
543 mutex_lock_nested(&rev->ns->lock, rev->ns->level);
544 last_read = rev->last_read;
545 if (last_read == rev->ns->revision) {
546 mutex_unlock(&rev->ns->lock);
549 if (wait_event_interruptible(rev->ns->wait,
551 READ_ONCE(rev->ns->revision)))
553 mutex_lock_nested(&rev->ns->lock, rev->ns->level);
556 avail = sprintf(buffer, "%ld\n", rev->ns->revision);
558 rev->last_read = rev->ns->revision;
561 mutex_unlock(&rev->ns->lock);
568 struct aa_revision *rev = kzalloc(sizeof(*rev), GFP_KERNEL);
570 if (!rev)
573 rev->ns = aa_get_ns(inode->i_private);
574 if (!rev->ns)
575 rev->ns = aa_get_current_ns();
576 file->private_data = rev;
583 struct aa_revision *rev = file->private_data;
586 if (rev) {
587 mutex_lock_nested(&rev->ns->lock, rev->ns->level);
588 poll_wait(file, &rev->ns->wait, pt);
589 if (rev->last_read < rev->ns->revision)
591 mutex_unlock(&rev->ns->lock);