switch fput to task_work_add
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 24 Jun 2012 05:56:45 +0000 (09:56 +0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sun, 22 Jul 2012 19:57:58 +0000 (23:57 +0400)
commit4a9d4b024a3102fc083c925c242d98ac27b1c5f6
tree1a4e9d1e86a2c1b70f8352c13da8a7eee97bc5f1
parenta2d4c71d1559426155e5da8db3265bfa0d8d398d
switch fput to task_work_add

... and schedule_work() for interrupt/kernel_thread callers
(and yes, now it *is* OK to call from interrupt).

We are guaranteed that __fput() will be done before we return
to userland (or exit).  Note that for fput() from a kernel
thread we get an async behaviour; it's almost always OK, but
sometimes you might need to have __fput() completed before
you do anything else.  There are two mechanisms for that -
a general barrier (flush_delayed_fput()) and explicit
__fput_sync().  Both should be used with care (as was the
case for fput() from kernel threads all along).  See comments
in fs/file_table.c for details.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/file_table.c
include/linux/file.h
init/main.c
This page took 0.026093 seconds and 5 git commands to generate.