summaryrefslogtreecommitdiffstats
path: root/fs/super.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2023-08-11 12:08:27 +0200
committerChristian Brauner <brauner@kernel.org>2023-08-21 14:35:32 +0200
commit38bcdd38935350abceace901313e007e84d84456 (patch)
tree9c1aee769e0882fc63071b180edaee36815d9b5e /fs/super.c
parentblock: call into the file system for ioctl BLKFLSBUF (diff)
downloadlinux-38bcdd38935350abceace901313e007e84d84456.tar.xz
linux-38bcdd38935350abceace901313e007e84d84456.zip
fs: remove get_super
get_super is unused now, remove it. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Christian Brauner <brauner@kernel.org> Reviewed-by: Josef Bacik <josef@toxicpanda.com> Message-Id: <20230811100828.1897174-17-hch@lst.de> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/super.c')
-rw-r--r--fs/super.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/fs/super.c b/fs/super.c
index 1a369fa3f0a6..1c7c74855437 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -791,43 +791,6 @@ void iterate_supers_type(struct file_system_type *type,
EXPORT_SYMBOL(iterate_supers_type);
/**
- * get_super - get 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. %NULL is returned if no match is found.
- */
-struct super_block *get_super(struct block_device *bdev)
-{
- struct super_block *sb;
-
- if (!bdev)
- return NULL;
-
- spin_lock(&sb_lock);
-rescan:
- list_for_each_entry(sb, &super_blocks, s_list) {
- if (hlist_unhashed(&sb->s_instances))
- continue;
- if (sb->s_bdev == bdev) {
- sb->s_count++;
- spin_unlock(&sb_lock);
- down_read(&sb->s_umount);
- /* still alive? */
- if (sb->s_root && (sb->s_flags & SB_BORN))
- return sb;
- up_read(&sb->s_umount);
- /* nope, got unmounted */
- spin_lock(&sb_lock);
- __put_super(sb);
- goto rescan;
- }
- }
- spin_unlock(&sb_lock);
- return NULL;
-}
-
-/**
* get_active_super - get an active reference to the superblock of a device
* @bdev: device to get the superblock for
*