linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] vfs: remove iterate_supers_type
@ 2018-05-17 15:47 Jeff Layton
  2018-05-24 15:22 ` Carlos Maiolino
  0 siblings, 1 reply; 2+ messages in thread
From: Jeff Layton @ 2018-05-17 15:47 UTC (permalink / raw)
  To: viro; +Cc: linux-kernel, linux-fsdevel

From: Jeff Layton <jlayton@redhat.com>

Nothing calls this.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
---
 fs/super.c         | 36 ------------------------------------
 include/linux/fs.h |  2 --
 2 files changed, 38 deletions(-)

diff --git a/fs/super.c b/fs/super.c
index 30b7490bd049..456276033e59 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -631,42 +631,6 @@ void iterate_supers(void (*f)(struct super_block *, int), int arg)
 	spin_unlock(&sb_lock);
 }
 
-/**
- *	iterate_supers_type - call function for superblocks of given type
- *	@type: fs type
- *	@f: function to call
- *	@arg: argument to pass to it
- *
- *	Scans the superblock list and calls given function, passing it
- *	locked superblock and given argument.
- */
-void iterate_supers_type(struct file_system_type *type,
-	void (*f)(struct super_block *, void *), void *arg)
-{
-	struct super_block *sb, *p = NULL;
-
-	spin_lock(&sb_lock);
-	hlist_for_each_entry(sb, &type->fs_supers, s_instances) {
-		sb->s_count++;
-		spin_unlock(&sb_lock);
-
-		down_read(&sb->s_umount);
-		if (sb->s_root && (sb->s_flags & SB_BORN))
-			f(sb, arg);
-		up_read(&sb->s_umount);
-
-		spin_lock(&sb_lock);
-		if (p)
-			__put_super(p);
-		p = sb;
-	}
-	if (p)
-		__put_super(p);
-	spin_unlock(&sb_lock);
-}
-
-EXPORT_SYMBOL(iterate_supers_type);
-
 static struct super_block *__get_super(struct block_device *bdev, bool excl)
 {
 	struct super_block *sb;
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 7107d291d853..c4761eba3b44 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -3116,8 +3116,6 @@ 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 *, int), int);
-extern void iterate_supers_type(struct file_system_type *,
-			        void (*)(struct super_block *, void *), void *);
 
 extern int dcache_dir_open(struct inode *, struct file *);
 extern int dcache_dir_close(struct inode *, struct file *);
-- 
2.17.0

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] vfs: remove iterate_supers_type
  2018-05-17 15:47 [PATCH] vfs: remove iterate_supers_type Jeff Layton
@ 2018-05-24 15:22 ` Carlos Maiolino
  0 siblings, 0 replies; 2+ messages in thread
From: Carlos Maiolino @ 2018-05-24 15:22 UTC (permalink / raw)
  To: Jeff Layton; +Cc: viro, linux-kernel, linux-fsdevel

On Thu, May 17, 2018 at 11:47:37AM -0400, Jeff Layton wrote:
> From: Jeff Layton <jlayton@redhat.com>
> 
> Nothing calls this.
> 
> Signed-off-by: Jeff Layton <jlayton@redhat.com>

looks like there are no reviews here yet, and it looks good to me, so, feel free
to add.

Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>

> ---
>  fs/super.c         | 36 ------------------------------------
>  include/linux/fs.h |  2 --
>  2 files changed, 38 deletions(-)
> 
> diff --git a/fs/super.c b/fs/super.c
> index 30b7490bd049..456276033e59 100644
> --- a/fs/super.c
> +++ b/fs/super.c
> @@ -631,42 +631,6 @@ void iterate_supers(void (*f)(struct super_block *, int), int arg)
>  	spin_unlock(&sb_lock);
>  }
>  
> -/**
> - *	iterate_supers_type - call function for superblocks of given type
> - *	@type: fs type
> - *	@f: function to call
> - *	@arg: argument to pass to it
> - *
> - *	Scans the superblock list and calls given function, passing it
> - *	locked superblock and given argument.
> - */
> -void iterate_supers_type(struct file_system_type *type,
> -	void (*f)(struct super_block *, void *), void *arg)
> -{
> -	struct super_block *sb, *p = NULL;
> -
> -	spin_lock(&sb_lock);
> -	hlist_for_each_entry(sb, &type->fs_supers, s_instances) {
> -		sb->s_count++;
> -		spin_unlock(&sb_lock);
> -
> -		down_read(&sb->s_umount);
> -		if (sb->s_root && (sb->s_flags & SB_BORN))
> -			f(sb, arg);
> -		up_read(&sb->s_umount);
> -
> -		spin_lock(&sb_lock);
> -		if (p)
> -			__put_super(p);
> -		p = sb;
> -	}
> -	if (p)
> -		__put_super(p);
> -	spin_unlock(&sb_lock);
> -}
> -
> -EXPORT_SYMBOL(iterate_supers_type);
> -
>  static struct super_block *__get_super(struct block_device *bdev, bool excl)
>  {
>  	struct super_block *sb;
> diff --git a/include/linux/fs.h b/include/linux/fs.h
> index 7107d291d853..c4761eba3b44 100644
> --- a/include/linux/fs.h
> +++ b/include/linux/fs.h
> @@ -3116,8 +3116,6 @@ 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 *, int), int);
> -extern void iterate_supers_type(struct file_system_type *,
> -			        void (*)(struct super_block *, void *), void *);
>  
>  extern int dcache_dir_open(struct inode *, struct file *);
>  extern int dcache_dir_close(struct inode *, struct file *);
> -- 
> 2.17.0
> 

-- 
Carlos

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-05-24 15:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-17 15:47 [PATCH] vfs: remove iterate_supers_type Jeff Layton
2018-05-24 15:22 ` Carlos Maiolino

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).