All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Al Viro <viro@zeniv.linux.org.uk>,
	Christian Brauner <brauner@kernel.org>
Cc: "Theodore Ts'o" <tytso@mit.edu>,
	Andreas Dilger <adilger.kernel@dilger.ca>,
	Mark Fasheh <mark@fasheh.com>, Joel Becker <jlbec@evilplan.org>,
	Joseph Qi <joseph.qi@linux.alibaba.com>,
	Jens Axboe <axboe@kernel.dk>,
	linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org,
	ocfs2-devel@lists.linux.dev, linux-block@vger.kernel.org
Subject: [PATCH 4/4] fs, block: remove bdev->bd_super
Date: Mon,  7 Aug 2023 12:26:25 +0100	[thread overview]
Message-ID: <20230807112625.652089-5-hch@lst.de> (raw)
In-Reply-To: <20230807112625.652089-1-hch@lst.de>

bdev->bd_super is unused now, remove it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/cramfs/inode.c         | 1 -
 fs/ext4/super.c           | 1 -
 fs/romfs/super.c          | 1 -
 fs/super.c                | 3 ---
 include/linux/blk_types.h | 1 -
 5 files changed, 7 deletions(-)

diff --git a/fs/cramfs/inode.c b/fs/cramfs/inode.c
index d2eea2e4807c4f..569f88dcb2f12c 100644
--- a/fs/cramfs/inode.c
+++ b/fs/cramfs/inode.c
@@ -493,7 +493,6 @@ static void cramfs_kill_sb(struct super_block *sb)
 		put_mtd_device(sb->s_mtd);
 		sb->s_mtd = NULL;
 	} else if (IS_ENABLED(CONFIG_CRAMFS_BLOCKDEV) && sb->s_bdev) {
-		sb->s_bdev->bd_super = NULL;
 		sync_blockdev(sb->s_bdev);
 		blkdev_put(sb->s_bdev, sb);
 	}
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 063832e2d12a8e..e6384782b4d036 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -5563,7 +5563,6 @@ static int __ext4_fill_super(struct fs_context *fc, struct super_block *sb)
 	spin_lock_init(&sbi->s_bdev_wb_lock);
 	errseq_check_and_advance(&sb->s_bdev->bd_inode->i_mapping->wb_err,
 				 &sbi->s_bdev_wb_err);
-	sb->s_bdev->bd_super = sb;
 	EXT4_SB(sb)->s_mount_state |= EXT4_ORPHAN_FS;
 	ext4_orphan_cleanup(sb, es);
 	EXT4_SB(sb)->s_mount_state &= ~EXT4_ORPHAN_FS;
diff --git a/fs/romfs/super.c b/fs/romfs/super.c
index b9eded546259bc..22cdb9a86a5748 100644
--- a/fs/romfs/super.c
+++ b/fs/romfs/super.c
@@ -593,7 +593,6 @@ static void romfs_kill_sb(struct super_block *sb)
 #endif
 #ifdef CONFIG_ROMFS_ON_BLOCK
 	if (sb->s_bdev) {
-		sb->s_bdev->bd_super = NULL;
 		sync_blockdev(sb->s_bdev);
 		blkdev_put(sb->s_bdev, sb);
 	}
diff --git a/fs/super.c b/fs/super.c
index efa28679e3e5b3..0023685815fda0 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -1369,7 +1369,6 @@ int get_tree_bdev(struct fs_context *fc,
 			return error;
 		}
 		s->s_flags |= SB_ACTIVE;
-		s->s_bdev->bd_super = s;
 	}
 
 	BUG_ON(fc->root);
@@ -1423,7 +1422,6 @@ struct dentry *mount_bdev(struct file_system_type *fs_type,
 		}
 
 		s->s_flags |= SB_ACTIVE;
-		s->s_bdev->bd_super = s;
 	}
 
 	return dget(s->s_root);
@@ -1436,7 +1434,6 @@ void kill_block_super(struct super_block *sb)
 
 	generic_shutdown_super(sb);
 	if (bdev) {
-		bdev->bd_super = NULL;
 		sync_blockdev(bdev);
 		blkdev_put(bdev, sb);
 	}
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
index 0bad62cca3d025..d5c5e59ddbd25a 100644
--- a/include/linux/blk_types.h
+++ b/include/linux/blk_types.h
@@ -52,7 +52,6 @@ struct block_device {
 	atomic_t		bd_openers;
 	spinlock_t		bd_size_lock; /* for bd_inode->i_size updates */
 	struct inode *		bd_inode;	/* will die */
-	struct super_block *	bd_super;
 	void *			bd_claiming;
 	void *			bd_holder;
 	const struct blk_holder_ops *bd_holder_ops;
-- 
2.39.2


  parent reply	other threads:[~2023-08-07 11:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-07 11:26 remove bdev->bd_super Christoph Hellwig
2023-08-07 11:26 ` [PATCH 1/4] fs: stop using bdev->bd_super in mark_buffer_write_io_error Christoph Hellwig
2023-08-07 11:26 ` [PATCH 2/4] ext4: don't use bdev->bd_super in __ext4_journal_get_write_access Christoph Hellwig
2023-08-08 14:33   ` Theodore Ts'o
2023-08-07 11:26 ` [PATCH 3/4] ocfs2: stop using bdev->bd_super for journal error logging Christoph Hellwig
2023-08-08  0:54   ` Joseph Qi
2023-08-07 11:26 ` Christoph Hellwig [this message]
2023-08-07 12:45   ` [PATCH 4/4] fs, block: remove bdev->bd_super Christian Brauner
2023-08-08  8:57 ` 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=20230807112625.652089-5-hch@lst.de \
    --to=hch@lst.de \
    --cc=adilger.kernel@dilger.ca \
    --cc=axboe@kernel.dk \
    --cc=brauner@kernel.org \
    --cc=jlbec@evilplan.org \
    --cc=joseph.qi@linux.alibaba.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=mark@fasheh.com \
    --cc=ocfs2-devel@lists.linux.dev \
    --cc=tytso@mit.edu \
    --cc=viro@zeniv.linux.org.uk \
    /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.