Re: [PATCH 1/2] vfs: stop clearing close on exec when closing a fd

2017-10-03 Thread Eric Dumazet
On Tue, Oct 3, 2017 at 3:58 AM, Mateusz Guzik  wrote:
> 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 
> ---

Reviewed-by: Eric Dumazet 


Re: [PATCH 1/2] vfs: stop clearing close on exec when closing a fd

2017-10-03 Thread Eric Dumazet
On Tue, Oct 3, 2017 at 3:58 AM, Mateusz Guzik  wrote:
> 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 
> ---

Reviewed-by: Eric Dumazet 


[PATCH 1/2] vfs: stop clearing close on exec when closing a fd

2017-10-03 Thread Mateusz Guzik
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 
---
 fs/file.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/file.c b/fs/file.c
index 1fc7fbb..9d047bd 100644
--- a/fs/file.c
+++ b/fs/file.c
@@ -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(>file_lock);
return filp_close(file, files);
-- 
1.8.3.1



[PATCH 1/2] vfs: stop clearing close on exec when closing a fd

2017-10-03 Thread Mateusz Guzik
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 
---
 fs/file.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/file.c b/fs/file.c
index 1fc7fbb..9d047bd 100644
--- a/fs/file.c
+++ b/fs/file.c
@@ -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(>file_lock);
return filp_close(file, files);
-- 
1.8.3.1