[PATCH] Fix unserialized task->files changing
[linux-2.6-block.git] / fs / binfmt_elf.c
index dfd8cfb7fb5dcd213ab74c41474c81e06a69f8e1..bb43da5cde5c3ec8dd0ba8f2aeb705b331cb9440 100644 (file)
@@ -1038,10 +1038,8 @@ out_free_interp:
 out_free_file:
        sys_close(elf_exec_fileno);
 out_free_fh:
-       if (files) {
-               put_files_struct(current->files);
-               current->files = files;
-       }
+       if (files)
+               reset_files_struct(current, files);
 out_free_ph:
        kfree(elf_phdata);
        goto out;