linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Jens Axboe <axboe@kernel.dk>
Cc: "Darrick J. Wong" <djwong@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Matthew Wilcox <willy@infradead.org>,
	Christian Brauner <christian@brauner.io>,
	linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-xfs@vger.kernel.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 1/6] fs: remove emergency_thaw_bdev
Date: Thu, 20 Jul 2023 16:04:47 +0200	[thread overview]
Message-ID: <20230720140452.63817-2-hch@lst.de> (raw)
In-Reply-To: <20230720140452.63817-1-hch@lst.de>

Fold emergency_thaw_bdev into it's only caller, to prepare for buffer.c
to be built only when buffer_head support is enabled.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/buffer.c   | 6 ------
 fs/internal.h | 6 ------
 fs/super.c    | 4 +++-
 3 files changed, 3 insertions(+), 13 deletions(-)

diff --git a/fs/buffer.c b/fs/buffer.c
index bd091329026c0f..376f468e16662d 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -562,12 +562,6 @@ static int osync_buffers_list(spinlock_t *lock, struct list_head *list)
 	return err;
 }
 
-void emergency_thaw_bdev(struct super_block *sb)
-{
-	while (sb->s_bdev && !thaw_bdev(sb->s_bdev))
-		printk(KERN_WARNING "Emergency Thaw on %pg\n", sb->s_bdev);
-}
-
 /**
  * sync_mapping_buffers - write out & wait upon a mapping's "associated" buffers
  * @mapping: the mapping which wants those buffers written
diff --git a/fs/internal.h b/fs/internal.h
index f7a3dc11102647..d538d832fd608b 100644
--- a/fs/internal.h
+++ b/fs/internal.h
@@ -23,16 +23,10 @@ struct mnt_idmap;
  */
 #ifdef CONFIG_BLOCK
 extern void __init bdev_cache_init(void);
-
-void emergency_thaw_bdev(struct super_block *sb);
 #else
 static inline void bdev_cache_init(void)
 {
 }
-static inline int emergency_thaw_bdev(struct super_block *sb)
-{
-	return 0;
-}
 #endif /* CONFIG_BLOCK */
 
 /*
diff --git a/fs/super.c b/fs/super.c
index e781226e28800c..bc666e7ee1a984 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -1029,7 +1029,9 @@ static void do_thaw_all_callback(struct super_block *sb)
 {
 	down_write(&sb->s_umount);
 	if (sb->s_root && sb->s_flags & SB_BORN) {
-		emergency_thaw_bdev(sb);
+		if (IS_ENABLED(CONFIG_BLOCK))
+			while (sb->s_bdev && !thaw_bdev(sb->s_bdev))
+				pr_warn("Emergency Thaw on %pg\n", sb->s_bdev);
 		thaw_super_locked(sb);
 	} else {
 		up_write(&sb->s_umount);
-- 
2.39.2


  reply	other threads:[~2023-07-20 14:05 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-20 14:04 allow building a kernel without buffer_heads Christoph Hellwig
2023-07-20 14:04 ` Christoph Hellwig [this message]
2023-07-20 14:12   ` [PATCH 1/6] fs: remove emergency_thaw_bdev Johannes Thumshirn
2023-07-20 15:43   ` Hannes Reinecke
2023-07-24 19:54   ` Luis Chamberlain
2023-07-20 14:04 ` [PATCH 2/6] fs: rename and move block_page_mkwrite_return Christoph Hellwig
2023-07-20 14:13   ` Johannes Thumshirn
2023-07-20 15:45   ` Hannes Reinecke
2023-07-24 19:55   ` Luis Chamberlain
2023-07-20 14:04 ` [PATCH 3/6] block: open code __generic_file_write_iter for blkdev writes Christoph Hellwig
2023-07-20 14:14   ` Johannes Thumshirn
2023-07-20 15:46   ` Hannes Reinecke
2023-07-24 20:05   ` Luis Chamberlain
2023-07-20 14:04 ` [PATCH 4/6] block: stop setting ->direct_IO Christoph Hellwig
2023-07-20 14:15   ` Johannes Thumshirn
2023-07-20 15:46   ` Hannes Reinecke
2023-07-24 20:07   ` Luis Chamberlain
2023-07-20 14:04 ` [PATCH 5/6] block: use iomap for writes to block devices Christoph Hellwig
2023-07-20 15:48   ` Hannes Reinecke
2023-07-24 20:14   ` Luis Chamberlain
     [not found]   ` <CGME20230727091404eucas1p2cbc14ec51eb1442496b1a4c30cd04803@eucas1p2.samsung.com>
2023-07-27  9:14     ` Pankaj Raghav
2023-07-20 14:04 ` [PATCH 6/6] fs: add CONFIG_BUFFER_HEAD Christoph Hellwig
2023-07-20 14:45   ` Matthew Wilcox
2023-07-21  6:24     ` Christoph Hellwig
2023-07-20 15:53   ` Hannes Reinecke
2023-07-21  6:25     ` Christoph Hellwig
2023-07-24 20:16   ` Luis Chamberlain
2023-07-20 14:51 ` allow building a kernel without buffer_heads Bob Peterson
2023-07-21  6:26   ` Christoph Hellwig
  -- strict thread matches above, loose matches on Subject: below --
2023-08-01 17:21 allow building a kernel without buffer_heads v3 Christoph Hellwig
2023-08-01 17:21 ` [PATCH 1/6] fs: remove emergency_thaw_bdev Christoph Hellwig
2023-08-02  7:21   ` Christian Brauner
2023-08-02 15:13   ` 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=20230720140452.63817-2-hch@lst.de \
    --to=hch@lst.de \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@kernel.dk \
    --cc=christian@brauner.io \
    --cc=djwong@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=willy@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).