From: Eric Biggers <ebiggers@kernel.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-fscrypt@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-btrfs@vger.kernel.org, Josef Bacik <josef@toxicpanda.com>
Subject: Re: [PATCH] fscrypt: move the call to fscrypt_destroy_keyring() into ->put_super()
Date: Tue, 5 Dec 2023 22:44:30 -0800 [thread overview]
Message-ID: <20231206064430.GA41771@sol.localdomain> (raw)
In-Reply-To: <ZXAW1BREPtCSUz4W@infradead.org>
On Tue, Dec 05, 2023 at 10:38:12PM -0800, Christoph Hellwig wrote:
> On Tue, Dec 05, 2023 at 04:13:24PM -0800, Eric Biggers wrote:
> > From: Eric Biggers <ebiggers@google.com>
> >
> > btrfs, which is planning to add support for fscrypt, has a variety of
> > asynchronous things it does with inodes that can potentially last until
> > ->put_super, when it shuts everything down and cleans up all async work.
> > Consequently, btrfs needs the call to fscrypt_destroy_keyring() to
> > happen either after or within ->put_super.
> >
> > Meanwhile, f2fs needs the call to fscrypt_destroy_keyring() to happen
> > either *before* or within ->put_super, due to the dependency of
> > f2fs_get_devices() on ->s_fs_info still existing.
>
> And that means f2fs should free ->s_fs_info in ->kill_sb after
> the call to shutdown_generic_super.
>
> So the right thing here is:
>
> - change f2fs to free ->s_fs_info later
> - move down fscrypt_destroy_keyring in the keneric code to happen
> after ->put_super
>
There are lots of filesystems that free their ->s_fs_info in ->put_super(). Are
they all wrong?
- Eric
next prev parent reply other threads:[~2023-12-06 6:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-06 0:13 [PATCH] fscrypt: move the call to fscrypt_destroy_keyring() into ->put_super() Eric Biggers
2023-12-06 0:21 ` Josef Bacik
2023-12-06 6:38 ` Christoph Hellwig
2023-12-06 6:44 ` Eric Biggers [this message]
2023-12-06 7:16 ` Christoph Hellwig
2023-12-09 21:29 ` Eric Biggers
2023-12-11 16:42 ` Christoph Hellwig
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=20231206064430.GA41771@sol.localdomain \
--to=ebiggers@kernel.org \
--cc=hch@infradead.org \
--cc=josef@toxicpanda.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-fscrypt@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
/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.