diff options
Diffstat (limited to 'kernel/exit.c')
| -rw-r--r-- | kernel/exit.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index 3b893e78ce61..506a957b665a 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
| @@ -512,14 +512,10 @@ static void __put_fs_struct(struct fs_struct *fs) | |||
| 512 | { | 512 | { |
| 513 | /* No need to hold fs->lock if we are killing it */ | 513 | /* No need to hold fs->lock if we are killing it */ |
| 514 | if (atomic_dec_and_test(&fs->count)) { | 514 | if (atomic_dec_and_test(&fs->count)) { |
| 515 | dput(fs->root); | 515 | path_put(&fs->root); |
| 516 | mntput(fs->rootmnt); | 516 | path_put(&fs->pwd); |
| 517 | dput(fs->pwd); | 517 | if (fs->altroot.dentry) |
| 518 | mntput(fs->pwdmnt); | 518 | path_put(&fs->altroot); |
| 519 | if (fs->altroot) { | ||
| 520 | dput(fs->altroot); | ||
| 521 | mntput(fs->altrootmnt); | ||
| 522 | } | ||
| 523 | kmem_cache_free(fs_cachep, fs); | 519 | kmem_cache_free(fs_cachep, fs); |
| 524 | } | 520 | } |
| 525 | } | 521 | } |
