]> git.karo-electronics.de Git - karo-tx-linux.git/commit
new helper: iterate_fd()
authorAl Viro <viro@zeniv.linux.org.uk>
Wed, 22 Aug 2012 02:32:06 +0000 (22:32 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 22 Aug 2012 21:30:48 +0000 (17:30 -0400)
commit45e98f8b31cb71bc072d0aa2ed2b2cf5acb52abf
tree9f0909f4ffe70f4eb1e1c9827fc1574aeb7dbbaf
parentb5db7692f05c3fe87403169bf5a0cac87babe3b6
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: Al Viro <viro@zeniv.linux.org.uk>
drivers/tty/tty_io.c
fs/file.c
include/linux/fdtable.h
net/core/netprio_cgroup.c
security/selinux/hooks.c