All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: xiubli@redhat.com
Cc: idryomov@gmail.com, ceph-devel@vger.kernel.org,
	jlayton@kernel.org, khiremat@redhat.com,
	linux-fscrypt@vger.kernel.org
Subject: Re: [PATCH] ceph: make sure all the files successfully put before unmounting
Date: Thu, 1 Dec 2022 21:10:15 +0000	[thread overview]
Message-ID: <Y4kYN8FPeq6NDe5i@gmail.com> (raw)
In-Reply-To: <Y4j+Ccqzi6JxWchv@sol.localdomain>

On Thu, Dec 01, 2022 at 11:18:33AM -0800, Eric Biggers wrote:
> On Thu, Dec 01, 2022 at 02:58:00PM +0800, xiubli@redhat.com wrote:
> > From: Xiubo Li <xiubli@redhat.com>
> > 
> > When close a file it will be deferred to call the fput(), which
> > will hold the inode's i_count. And when unmounting the mountpoint
> > the evict_inodes() may skip evicting some inodes.
> > 
> > If encrypt is enabled the kernel generate a warning when removing
> > the encrypt keys when the skipped inodes still hold the keyring:
> 
> This does not make sense.  Unmounting is only possible once all the files on the
> filesystem have been closed.
> 

Specifically, __fput() puts the reference to the dentry (and thus the inode)
*before* it puts the reference to the mount.  And an unmount cannot be done
while the mount still has references.  So there should not be any issue here.

- Eric

  reply	other threads:[~2022-12-01 21:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-01  6:58 [PATCH] ceph: make sure all the files successfully put before unmounting xiubli
2022-12-01 13:04 ` Ilya Dryomov
2022-12-01 13:52   ` Xiubo Li
2022-12-01 15:50 ` kernel test robot
2022-12-01 19:18 ` Eric Biggers
2022-12-01 21:10   ` Eric Biggers [this message]
2022-12-02  1:49     ` Xiubo Li
2022-12-02  4:19       ` Eric Biggers
2022-12-02  7:04         ` Xiubo Li
2022-12-29 23:53           ` Eric Biggers
2022-12-30  5:44             ` Xiubo Li
2022-12-02  1:51   ` Xiubo Li

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=Y4kYN8FPeq6NDe5i@gmail.com \
    --to=ebiggers@kernel.org \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.com \
    --cc=jlayton@kernel.org \
    --cc=khiremat@redhat.com \
    --cc=linux-fscrypt@vger.kernel.org \
    --cc=xiubli@redhat.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.