diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-06-24 09:56:45 +0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-07-22 23:57:58 +0400 |
commit | 4a9d4b024a3102fc083c925c242d98ac27b1c5f6 (patch) | |
tree | 1a4e9d1e86a2c1b70f8352c13da8a7eee97bc5f1 /include | |
parent | a2d4c71d1559426155e5da8db3265bfa0d8d398d (diff) | |
download | linux-3.10-4a9d4b024a3102fc083c925c242d98ac27b1c5f6.tar.gz linux-3.10-4a9d4b024a3102fc083c925c242d98ac27b1c5f6.tar.bz2 linux-3.10-4a9d4b024a3102fc083c925c242d98ac27b1c5f6.zip |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/file.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/file.h b/include/linux/file.h index 58bf158c53d..a22408bac0d 100644 --- a/include/linux/file.h +++ b/include/linux/file.h @@ -39,4 +39,7 @@ extern void put_unused_fd(unsigned int fd); extern void fd_install(unsigned int fd, struct file *file); +extern void flush_delayed_fput(void); +extern void __fput_sync(struct file *); + #endif /* __LINUX_FILE_H */ |