diff options
author | Christian Brauner <brauner@kernel.org> | 2023-10-24 15:01:12 +0200 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2023-11-18 14:59:23 +0100 |
commit | 434f8d8299f2a0c97578f77ab23a70cd0ae56544 (patch) | |
tree | a0c2155a868485ad4972f08685fd0d378cb4b5ce /fs/super.c | |
parent | bdev: implement freeze and thaw holder operations (diff) | |
download | linux-434f8d8299f2a0c97578f77ab23a70cd0ae56544.tar.xz linux-434f8d8299f2a0c97578f77ab23a70cd0ae56544.zip |
fs: remove get_active_super()
This function is now unused so remove it. One less function that uses
the global superblock list.
Link: https://lore.kernel.org/r/20231024-vfs-super-freeze-v2-6-599c19f4faac@kernel.org
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/super.c')
-rw-r--r-- | fs/super.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/fs/super.c b/fs/super.c index 8c943ab1f424..b49a49d70450 100644 --- a/fs/super.c +++ b/fs/super.c @@ -1027,34 +1027,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; |