Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 91922
b: refs/heads/master
c: 1ec7f1d
h: refs/heads/master
v: v3
  • Loading branch information
Al Viro committed Apr 22, 2008
1 parent faf4d27 commit d09a517
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9b4f526cdc0f95f635607dfba6ac788b3deca188
refs/heads/master: 1ec7f1ddbe5ba49f7b10c3b129d6d5c90c43526c
27 changes: 6 additions & 21 deletions trunk/kernel/exit.c
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ void reset_files_struct(struct task_struct *tsk, struct files_struct *files)
}
EXPORT_SYMBOL(reset_files_struct);

static void __exit_files(struct task_struct *tsk)
void exit_files(struct task_struct *tsk)
{
struct files_struct * files = tsk->files;

Expand All @@ -533,12 +533,7 @@ static void __exit_files(struct task_struct *tsk)
}
}

void exit_files(struct task_struct *tsk)
{
__exit_files(tsk);
}

static void __put_fs_struct(struct fs_struct *fs)
void put_fs_struct(struct fs_struct *fs)
{
/* No need to hold fs->lock if we are killing it */
if (atomic_dec_and_test(&fs->count)) {
Expand All @@ -550,28 +545,18 @@ static void __put_fs_struct(struct fs_struct *fs)
}
}

void put_fs_struct(struct fs_struct *fs)
{
__put_fs_struct(fs);
}

static void __exit_fs(struct task_struct *tsk)
void exit_fs(struct task_struct *tsk)
{
struct fs_struct * fs = tsk->fs;

if (fs) {
task_lock(tsk);
tsk->fs = NULL;
task_unlock(tsk);
__put_fs_struct(fs);
put_fs_struct(fs);
}
}

void exit_fs(struct task_struct *tsk)
{
__exit_fs(tsk);
}

EXPORT_SYMBOL_GPL(exit_fs);

/*
Expand Down Expand Up @@ -967,8 +952,8 @@ NORET_TYPE void do_exit(long code)
if (group_dead)
acct_process();
exit_sem(tsk);
__exit_files(tsk);
__exit_fs(tsk);
exit_files(tsk);
exit_fs(tsk);
check_stack_usage();
exit_thread();
cgroup_exit(tsk, 1);
Expand Down

0 comments on commit d09a517

Please sign in to comment.