From: Christian Brauner <brauner@kernel.org>
To: Daniele Di Proietto <daniele.di.proietto@gmail.com>
Cc: io-uring@vger.kernel.org, Jens Axboe <axboe@kernel.dk>,
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 13:00:20 +0100 [thread overview]
Message-ID: <20260323-kocht-meisennest-ac89063f104f@brauner> (raw)
In-Reply-To: <20260321232142.911280-4-daniele.di.proietto@gmail.com>
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.
It's fine that io_uring has its own fdtable. I don't want anyone else
to get ideas about doing the same by exporting ever more tiny helpers.
next prev parent reply other threads:[~2026-03-23 12:00 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 [this message]
2026-03-23 14:20 ` Jens Axboe
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=20260323-kocht-meisennest-ac89063f104f@brauner \
--to=brauner@kernel.org \
--cc=asml.silence@gmail.com \
--cc=axboe@kernel.dk \
--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