aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/binfmt_elf.c6
-rw-r--r--fs/binfmt_misc.c6
-rw-r--r--fs/exec.c3
3 files changed, 5 insertions, 10 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index dfd8cfb7fb5d..bb43da5cde5c 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -1038,10 +1038,8 @@ out_free_interp:
1038out_free_file: 1038out_free_file:
1039 sys_close(elf_exec_fileno); 1039 sys_close(elf_exec_fileno);
1040out_free_fh: 1040out_free_fh:
1041 if (files) { 1041 if (files)
1042 put_files_struct(current->files); 1042 reset_files_struct(current, files);
1043 current->files = files;
1044 }
1045out_free_ph: 1043out_free_ph:
1046 kfree(elf_phdata); 1044 kfree(elf_phdata);
1047 goto out; 1045 goto out;
diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c
index 66ba137f8661..1713c48fef54 100644
--- a/fs/binfmt_misc.c
+++ b/fs/binfmt_misc.c
@@ -215,10 +215,8 @@ _error:
215 bprm->interp_flags = 0; 215 bprm->interp_flags = 0;
216 bprm->interp_data = 0; 216 bprm->interp_data = 0;
217_unshare: 217_unshare:
218 if (files) { 218 if (files)
219 put_files_struct(current->files); 219 reset_files_struct(current, files);
220 current->files = files;
221 }
222 goto _ret; 220 goto _ret;
223} 221}
224 222
diff --git a/fs/exec.c b/fs/exec.c
index 97df6e0aeaee..a8efe35176b0 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -898,8 +898,7 @@ int flush_old_exec(struct linux_binprm * bprm)
898 return 0; 898 return 0;
899 899
900mmap_failed: 900mmap_failed:
901 put_files_struct(current->files); 901 reset_files_struct(current, files);
902 current->files = files;
903out: 902out:
904 return retval; 903 return retval;
905} 904}