public inbox for io-uring@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Christian Brauner <brauner@kernel.org>,
	Daniele Di Proietto <daniele.di.proietto@gmail.com>
Cc: io-uring@vger.kernel.org, Keith Busch <kbusch@kernel.org>,
	Pavel Begunkov <asml.silence@gmail.com>,
	linux-fsdevel@vger.kernel.org,
	Alexander Viro <viro@zeniv.linux.org.uk>, Jan Kara <jack@suse.cz>
Subject: Re: [PATCH v3 3/4] fs: Export new helper do_replace_fd_locked()
Date: Mon, 23 Mar 2026 08:20:53 -0600	[thread overview]
Message-ID: <4970a06b-95f5-45d7-86dd-1055c1811ed6@kernel.dk> (raw)
In-Reply-To: <20260323-kocht-meisennest-ac89063f104f@brauner>

On 3/23/26 6:00 AM, Christian Brauner wrote:
> On Sat, Mar 21, 2026 at 11:21:41PM +0000, Daniele Di Proietto wrote:
>> This is a new helper that installs a new file in a specific fd number
>> and returns the previous file that was there. It requires holding the
>> files_lock.
>>
>> In order to keep ksys_dup3() simple, this commit introduces a new
>> static do_dup3() helper.
>>
>> It's going to be used in a future commit.
>>
>> Signed-off-by: Daniele Di Proietto <daniele.di.proietto@gmail.com>
>> ---
> 
> I think this spaghetti here is really not acceptable and the export of
> do_replace_fd_locked() is really ugly. Please try and come up with a
> solution where you modify e.g. replace_fd() that does like 90% of what
> you want minues that "needs async" shortcut you have.

Fully agree.

-- 
Jens Axboe

  reply	other threads:[~2026-03-23 14:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-21 23:21 [PATCH v3 0/4] New IORING_OP_DUP Daniele Di Proietto
2026-03-21 23:21 ` [PATCH v3 1/4] io_uring: Extract io_file_get_fixed_node() helper Daniele Di Proietto
2026-03-21 23:21 ` [PATCH v3 2/4] fs: Export expand_files() Daniele Di Proietto
2026-03-21 23:21 ` [PATCH v3 3/4] fs: Export new helper do_replace_fd_locked() Daniele Di Proietto
2026-03-23 12:00   ` Christian Brauner
2026-03-23 14:20     ` Jens Axboe [this message]
2026-03-21 23:21 ` [PATCH v3 4/4] io_uring: Add IORING_OP_DUP Daniele Di Proietto
2026-03-23 14:23   ` Jens Axboe

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=4970a06b-95f5-45d7-86dd-1055c1811ed6@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=asml.silence@gmail.com \
    --cc=brauner@kernel.org \
    --cc=daniele.di.proietto@gmail.com \
    --cc=io-uring@vger.kernel.org \
    --cc=jack@suse.cz \
    --cc=kbusch@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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