Skip to content

Commit 38bcdd3

Browse files
Christoph Hellwigbrauner
authored andcommitted
fs: remove get_super
get_super is unused now, remove it. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Christian Brauner <[email protected]> Reviewed-by: Josef Bacik <[email protected]> Message-Id: <[email protected]> Signed-off-by: Christian Brauner <[email protected]>
1 parent 2142b88 commit 38bcdd3

File tree

2 files changed

+0
-38
lines changed

2 files changed

+0
-38
lines changed

fs/super.c

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -790,43 +790,6 @@ void iterate_supers_type(struct file_system_type *type,
790790

791791
EXPORT_SYMBOL(iterate_supers_type);
792792

793-
/**
794-
* get_super - get the superblock of a device
795-
* @bdev: device to get the superblock for
796-
*
797-
* Scans the superblock list and finds the superblock of the file system
798-
* mounted on the device given. %NULL is returned if no match is found.
799-
*/
800-
struct super_block *get_super(struct block_device *bdev)
801-
{
802-
struct super_block *sb;
803-
804-
if (!bdev)
805-
return NULL;
806-
807-
spin_lock(&sb_lock);
808-
rescan:
809-
list_for_each_entry(sb, &super_blocks, s_list) {
810-
if (hlist_unhashed(&sb->s_instances))
811-
continue;
812-
if (sb->s_bdev == bdev) {
813-
sb->s_count++;
814-
spin_unlock(&sb_lock);
815-
down_read(&sb->s_umount);
816-
/* still alive? */
817-
if (sb->s_root && (sb->s_flags & SB_BORN))
818-
return sb;
819-
up_read(&sb->s_umount);
820-
/* nope, got unmounted */
821-
spin_lock(&sb_lock);
822-
__put_super(sb);
823-
goto rescan;
824-
}
825-
}
826-
spin_unlock(&sb_lock);
827-
return NULL;
828-
}
829-
830793
/**
831794
* get_active_super - get an active reference to the superblock of a device
832795
* @bdev: device to get the superblock for

include/linux/fs.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2913,7 +2913,6 @@ extern int vfs_readlink(struct dentry *, char __user *, int);
29132913
extern struct file_system_type *get_filesystem(struct file_system_type *fs);
29142914
extern void put_filesystem(struct file_system_type *fs);
29152915
extern struct file_system_type *get_fs_type(const char *name);
2916-
extern struct super_block *get_super(struct block_device *);
29172916
extern struct super_block *get_active_super(struct block_device *bdev);
29182917
extern void drop_super(struct super_block *sb);
29192918
extern void drop_super_exclusive(struct super_block *sb);

0 commit comments

Comments
 (0)