linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: Mateusz Guzik <mjguzik@gmail.com>
Cc: brauner@kernel.org, jack@suse.cz, linux-kernel@vger.kernel.org,
	linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] close_files(): reimplement based on do_close_on_exec()
Date: Wed, 14 Aug 2024 06:24:20 +0100	[thread overview]
Message-ID: <20240814052420.GQ13701@ZenIV> (raw)
In-Reply-To: <20240812075659.1399447-1-mjguzik@gmail.com>

On Mon, Aug 12, 2024 at 09:56:58AM +0200, Mateusz Guzik wrote:
> While here take more advantage of the fact nobody should be messing with
> the table anymore and don't clear the fd slot.
> 
> Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
> ---
> 
> how about this instead, I think it's a nicer clean up.

> It's literally do_close_on_exec except locking and put fd are deleted.

TBH, I don't see much benefit that way - if anything, you are doing
a bunch of extra READ_ONCE() of the same thing (files->fdt), for no
visible reason...

  reply	other threads:[~2024-08-14  5:24 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-12  6:42 [PATCHES] fs/file.c stuff Al Viro
2024-08-12  6:44 ` [PATCH 01/11] get rid of ...lookup...fdget_rcu() family Al Viro
2024-08-12  6:44   ` [PATCH 02/11] remove pointless includes of <linux/fdtable.h> Al Viro
2024-08-12  9:25     ` Christian Brauner
2024-08-12  6:44   ` [PATCH 03/11] close_files(): don't bother with xchg() Al Viro
2024-08-12  7:56     ` [PATCH] close_files(): reimplement based on do_close_on_exec() Mateusz Guzik
2024-08-14  5:24       ` Al Viro [this message]
2024-08-14  5:34         ` Mateusz Guzik
2024-08-12  6:44   ` [PATCH 04/11] proc_fd_getattr(): don't bother with S_ISDIR() check Al Viro
2024-08-12  6:44   ` [PATCH 05/11] move close_range(2) into fs/file.c, fold __close_range() into it Al Viro
2024-08-12  6:44   ` [PATCH 06/11] sane_fdtable_size(): don't bother looking at descriptors we are not going to copy Al Viro
2024-08-12  9:30     ` Christian Brauner
2024-08-12  6:44   ` [PATCH 07/11] fs/file.c: remove sanity_check and add likely/unlikely in alloc_fd() Al Viro
2024-08-12  6:44   ` [PATCH 08/11] fs/file.c: conditionally clear full_fds Al Viro
2024-08-12  6:44   ` [PATCH 09/11] fs/file.c: add fast path in find_next_fd() Al Viro
2024-08-12  6:44   ` [PATCH 10/11] alloc_fdtable(): change calling conventions Al Viro
2024-08-12  9:35     ` Christian Brauner
2024-08-12  6:44   ` [PATCH 11/11] dup_fd(): " Al Viro
2024-08-12  9:32     ` Christian Brauner
2024-08-12  9:24   ` [PATCH 01/11] get rid of ...lookup...fdget_rcu() family Christian Brauner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240814052420.GQ13701@ZenIV \
    --to=viro@zeniv.linux.org.uk \
    --cc=brauner@kernel.org \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjguzik@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).