Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 52979082 authored by Mateusz Guzik's avatar Mateusz Guzik Committed by Al Viro
Browse files

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: default avatarMateusz Guzik <mguzik@redhat.com>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 63dcb81e
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -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);