Re: [RFC] vfs: don't bother clearing close_on_exec bit for unused fds

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2015-11-03 at 10:41 +0100, Rasmus Villemoes wrote:

> @@ -667,7 +667,7 @@ void do_close_on_exec(struct files_struct *files)
>  		fdt = files_fdtable(files);
>  		if (fd >= fdt->max_fds)
>  			break;
> -		set = fdt->close_on_exec[i];
> +		set = fdt->close_on_exec[i] & fdt->open_fds[i];
>  		if (!set)
>  			continue;
>  		fdt->close_on_exec[i] = 0;

If you don't bother, why leaving this final fdt->close_on_exec[i] = 0 ?



--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux