vfs: stop clearing close on exec when closing a fd

Codepaths allocating a fd always make sure the bit is set/unset
depending on flags, thus clearing on close is redundant.

Signed-off-by: Mateusz Guzik <mguzik@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Mateusz Guzik 2017-10-03 12:58:14 +02:00 committed by Al Viro
parent 63dcb81e5b
commit 5297908270
1 changed files with 0 additions and 1 deletions

View File

@ -631,7 +631,6 @@ int __close_fd(struct files_struct *files, unsigned fd)
if (!file)
goto out_unlock;
rcu_assign_pointer(fdt->fd[fd], NULL);
__clear_close_on_exec(fd, fdt);
__put_unused_fd(files, fd);
spin_unlock(&files->file_lock);
return filp_close(file, files);