From: Christian Brauner <brauner@kernel.org>
To: Jan Kara <jack@suse.cz>, Christoph Hellwig <hch@lst.de>
Cc: linux-fsdevel@vger.kernel.org,
"Darrick J. Wong" <djwong@kernel.org>,
Christian Brauner <brauner@kernel.org>
Subject: [PATCH 4/7] fs: remove get_active_super()
Date: Wed, 27 Sep 2023 15:21:17 +0200 [thread overview]
Message-ID: <20230927-vfs-super-freeze-v1-4-ecc36d9ab4d9@kernel.org> (raw)
In-Reply-To: <20230927-vfs-super-freeze-v1-0-ecc36d9ab4d9@kernel.org>
This function is now unused so remove it. One less function that uses
the global superblock list.
Signed-off-by: Christian Brauner <brauner@kernel.org>
---
fs/super.c | 28 ----------------------------
include/linux/fs.h | 1 -
2 files changed, 29 deletions(-)
diff --git a/fs/super.c b/fs/super.c
index 672f1837fbef..181ac8501301 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -1016,34 +1016,6 @@ void iterate_supers_type(struct file_system_type *type,
EXPORT_SYMBOL(iterate_supers_type);
-/**
- * get_active_super - get an active reference to the superblock of a device
- * @bdev: device to get the superblock for
- *
- * Scans the superblock list and finds the superblock of the file system
- * mounted on the device given. Returns the superblock with an active
- * reference or %NULL if none was found.
- */
-struct super_block *get_active_super(struct block_device *bdev)
-{
- struct super_block *sb;
-
- if (!bdev)
- return NULL;
-
- spin_lock(&sb_lock);
- list_for_each_entry(sb, &super_blocks, s_list) {
- if (sb->s_bdev == bdev) {
- if (!grab_super(sb))
- return NULL;
- super_unlock_excl(sb);
- return sb;
- }
- }
- spin_unlock(&sb_lock);
- return NULL;
-}
-
struct super_block *user_get_super(dev_t dev, bool excl)
{
struct super_block *sb;
diff --git a/include/linux/fs.h b/include/linux/fs.h
index b528f063e8ff..ad0ddc10d560 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -3052,7 +3052,6 @@ extern int vfs_readlink(struct dentry *, char __user *, int);
extern struct file_system_type *get_filesystem(struct file_system_type *fs);
extern void put_filesystem(struct file_system_type *fs);
extern struct file_system_type *get_fs_type(const char *name);
-extern struct super_block *get_active_super(struct block_device *bdev);
extern void drop_super(struct super_block *sb);
extern void drop_super_exclusive(struct super_block *sb);
extern void iterate_supers(void (*)(struct super_block *, void *), void *);
--
2.34.1
next prev parent reply other threads:[~2023-09-27 13:21 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-27 13:21 [PATCH 0/7] Implement freeze and thaw as holder operations Christian Brauner
2023-09-27 13:21 ` [PATCH 1/7] bdev: rename freeze and thaw helpers Christian Brauner
2023-09-27 14:35 ` Darrick J. Wong
2023-10-02 6:51 ` Christoph Hellwig
2023-10-02 11:28 ` Jan Kara
2023-09-27 13:21 ` [PATCH 2/7] bdev: add freeze and thaw holder operations Christian Brauner
2023-09-27 14:38 ` Darrick J. Wong
2023-10-02 6:52 ` Christoph Hellwig
2023-10-02 16:32 ` Jan Kara
2023-09-27 13:21 ` [PATCH 3/7] bdev: implement " Christian Brauner
2023-09-27 14:53 ` Darrick J. Wong
2023-09-27 15:15 ` Christian Brauner
2023-09-27 16:01 ` Darrick J. Wong
2023-10-02 6:54 ` Christoph Hellwig
2023-10-02 7:10 ` Christoph Hellwig
2023-09-27 13:21 ` Christian Brauner [this message]
2023-09-27 14:54 ` [PATCH 4/7] fs: remove get_active_super() Darrick J. Wong
2023-10-02 7:10 ` Christoph Hellwig
2023-10-02 16:22 ` Jan Kara
2023-09-27 13:21 ` [PATCH 5/7] super: remove bd_fsfreeze_{mutex,sb} Christian Brauner
2023-09-27 15:11 ` Darrick J. Wong
2023-09-27 15:18 ` Christian Brauner
2023-10-02 7:12 ` Christoph Hellwig
2023-10-02 16:24 ` Jan Kara
2023-09-27 13:21 ` [PATCH 6/7] fs: remove unused helper Christian Brauner
2023-09-27 15:12 ` Darrick J. Wong
2023-10-02 7:12 ` Christoph Hellwig
2023-10-02 16:26 ` Jan Kara
2023-09-27 13:21 ` [PATCH 7/7] porting: document block device freeze and thaw changes Christian Brauner
2023-09-27 15:19 ` Darrick J. Wong
2023-10-02 16:45 ` Jan Kara
2023-10-05 6: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=20230927-vfs-super-freeze-v1-4-ecc36d9ab4d9@kernel.org \
--to=brauner@kernel.org \
--cc=djwong@kernel.org \
--cc=hch@lst.de \
--cc=jack@suse.cz \
--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 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).