All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Brauner <brauner@kernel.org>
To: Christoph Hellwig <hch@lst.de>, Jan Kara <jack@suse.com>,
	 linux-fsdevel@vger.kernel.org
Cc: Christian Brauner <brauner@kernel.org>
Subject: [PATCH 2/2] super: don't bother with WARN_ON_ONCE()
Date: Mon, 27 Nov 2023 12:51:31 +0100	[thread overview]
Message-ID: <20231127-vfs-super-massage-wait-v1-2-9ab277bfd01a@kernel.org> (raw)
In-Reply-To: <20231127-vfs-super-massage-wait-v1-0-9ab277bfd01a@kernel.org>

We hold our own active reference and we've checked it above.

Signed-off-by: Christian Brauner <brauner@kernel.org>
---
 fs/super.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/fs/super.c b/fs/super.c
index f3227b22879d..844ca13e9d93 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -2067,10 +2067,7 @@ int freeze_super(struct super_block *sb, enum freeze_holder who)
 	/* Release s_umount to preserve sb_start_write -> s_umount ordering */
 	super_unlock_excl(sb);
 	sb_wait_write(sb, SB_FREEZE_WRITE);
-	if (!super_lock_excl(sb)) {
-		WARN_ON_ONCE("Dying superblock while freezing!");
-		return -EINVAL;
-	}
+	__super_lock_excl(sb);
 
 	/* Now we go and block page faults... */
 	sb->s_writers.frozen = SB_FREEZE_PAGEFAULT;

-- 
2.42.0


  parent reply	other threads:[~2023-11-27 11:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-27 11:51 [PATCH 0/2] super: small tweaks Christian Brauner
2023-11-27 11:51 ` [PATCH 1/2] super: massage wait event mechanism Christian Brauner
2023-11-27 13:59   ` Christoph Hellwig
2023-11-27 14:52     ` Christian Brauner
2023-11-27 14:54       ` Christoph Hellwig
2023-11-27 16:46   ` Christoph Hellwig
2023-11-28 15:56     ` Christian Brauner
2023-11-27 11:51 ` Christian Brauner [this message]
2023-11-27 13:59   ` [PATCH 2/2] super: don't bother with WARN_ON_ONCE() Christoph Hellwig
2023-11-27 14:53     ` Christian Brauner
2023-11-27 16:48       ` 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=20231127-vfs-super-massage-wait-v1-2-9ab277bfd01a@kernel.org \
    --to=brauner@kernel.org \
    --cc=hch@lst.de \
    --cc=jack@suse.com \
    --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.