diff options
Diffstat (limited to 'kernel/exit.c')
-rw-r--r-- | kernel/exit.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index d891883420f7..4b6fb054b25d 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -487,6 +487,18 @@ void fastcall put_files_struct(struct files_struct *files) | |||
487 | 487 | ||
488 | EXPORT_SYMBOL(put_files_struct); | 488 | EXPORT_SYMBOL(put_files_struct); |
489 | 489 | ||
490 | void reset_files_struct(struct task_struct *tsk, struct files_struct *files) | ||
491 | { | ||
492 | struct files_struct *old; | ||
493 | |||
494 | old = tsk->files; | ||
495 | task_lock(tsk); | ||
496 | tsk->files = files; | ||
497 | task_unlock(tsk); | ||
498 | put_files_struct(old); | ||
499 | } | ||
500 | EXPORT_SYMBOL(reset_files_struct); | ||
501 | |||
490 | static inline void __exit_files(struct task_struct *tsk) | 502 | static inline void __exit_files(struct task_struct *tsk) |
491 | { | 503 | { |
492 | struct files_struct * files = tsk->files; | 504 | struct files_struct * files = tsk->files; |