Skip to content
Commit c3c073f8 authored by Al Viro's avatar Al Viro
Browse files

new helper: iterate_fd()



iterates through the opened files in given descriptor table,
calling a supplied function; we stop once non-zero is returned.
Callback gets struct file *, descriptor number and const void *
argument passed to iterator.  It is called with files->file_lock
held, so it is not allowed to block.

tty_io, netprio_cgroup and selinux flush_unauthorized_files()
converted to its use.

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent ad47bd72
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment