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] fs: delay sysctl_nr_open check in expand_files()
Date: Sat, 16 Nov 2024 07:36:26 +0000 [thread overview]
Message-ID: <20241116073626.GB3387508@ZenIV> (raw)
In-Reply-To: <20241116064128.280870-1-mjguzik@gmail.com>
On Sat, Nov 16, 2024 at 07:41:28AM +0100, Mateusz Guzik wrote:
> Suppose a thread sharing the table started a resize, while
> sysctl_nr_open got lowered to a value which prohibits it. This is still
> going to go through with and without the patch, which is fine.
>
> Further suppose another thread shows up to do a matching expansion while
> resize_in_progress == true. It is going to error out since it performs
> the sysctl_nr_open check *before* finding out if there is an expansion
> in progress. But the aformentioned thread is going to succeded, so the
> error is spurious (and it would not happen if the thread showed up a
> little bit later).
>
> Checking the sysctl *after* we know there are no pending updates sorts
> it out.
What for? No, seriously - what's the point? What could possibly
observe an inconsistent situation? How would that look like?
next prev parent reply other threads:[~2024-11-16 7:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-16 6:41 [PATCH] fs: delay sysctl_nr_open check in expand_files() Mateusz Guzik
2024-11-16 7:36 ` Al Viro [this message]
2024-11-16 7:42 ` Al Viro
2024-11-16 8:01 ` Mateusz Guzik
2024-11-20 8:08 ` 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=20241116073626.GB3387508@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.