linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: viro@zeniv.linux.org.uk
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	dhowells@redhat.com
Subject: [RFC PATCH 8/8] vfs: Kill off mount_single()
Date: Thu, 21 Mar 2019 11:48:36 +0000	[thread overview]
Message-ID: <155316891636.29437.377556597687370007.stgit@warthog.procyon.org.uk> (raw)
In-Reply-To: <155316885201.29437.3428987891437242750.stgit@warthog.procyon.org.uk>

Kill mount_single() off as nothing now uses it.  It has been replaced by
vfs_get_super() keyed with vfs_get_single_super or
vfs_get_single_reconf_super.

Signed-off-by: David Howells <dhowells@redhat.com>
---

 Documentation/filesystems/vfs.txt |    4 +--
 fs/super.c                        |   55 -------------------------------------
 include/linux/fs.h                |    3 --
 3 files changed, 2 insertions(+), 60 deletions(-)

diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
index 761c6fd24a53..6ef83fdfffdc 100644
--- a/Documentation/filesystems/vfs.txt
+++ b/Documentation/filesystems/vfs.txt
@@ -181,8 +181,8 @@ and provides a fill_super() callback instead. The generic variants are:
 
   mount_nodev: mount a filesystem that is not backed by a device
 
-  mount_single: mount a filesystem which shares the instance between
-  	all mounts
+  vfs_get_super: mount a filesystem with one of a number of superblock
+		 sharing options.
 
 A fill_super() callback implementation has the following arguments:
 
diff --git a/fs/super.c b/fs/super.c
index fa1d697b73bb..39963e597118 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -1449,61 +1449,6 @@ struct dentry *mount_nodev(struct file_system_type *fs_type,
 }
 EXPORT_SYMBOL(mount_nodev);
 
-static int reconfigure_single(struct super_block *s,
-			      int flags, void *data)
-{
-	struct fs_context *fc;
-	int ret;
-
-	/* The caller really need to be passing fc down into mount_single(),
-	 * then a chunk of this can be removed.  [Bollocks -- AV]
-	 * Better yet, reconfiguration shouldn't happen, but rather the second
-	 * mount should be rejected if the parameters are not compatible.
-	 */
-	fc = fs_context_for_reconfigure(s->s_root, flags, MS_RMT_MASK);
-	if (IS_ERR(fc))
-		return PTR_ERR(fc);
-
-	ret = parse_monolithic_mount_data(fc, data);
-	if (ret < 0)
-		goto out;
-
-	ret = reconfigure_super(fc);
-out:
-	put_fs_context(fc);
-	return ret;
-}
-
-static int compare_single(struct super_block *s, void *p)
-{
-	return 1;
-}
-
-struct dentry *mount_single(struct file_system_type *fs_type,
-	int flags, void *data,
-	int (*fill_super)(struct super_block *, void *, int))
-{
-	struct super_block *s;
-	int error;
-
-	s = sget(fs_type, compare_single, set_anon_super, flags, NULL);
-	if (IS_ERR(s))
-		return ERR_CAST(s);
-	if (!s->s_root) {
-		error = fill_super(s, data, flags & SB_SILENT ? 1 : 0);
-		if (!error)
-			s->s_flags |= SB_ACTIVE;
-	} else {
-		error = reconfigure_single(s, flags, data);
-	}
-	if (unlikely(error)) {
-		deactivate_locked_super(s);
-		return ERR_PTR(error);
-	}
-	return dget(s->s_root);
-}
-EXPORT_SYMBOL(mount_single);
-
 /**
  * vfs_get_tree - Get the mountable root
  * @fc: The superblock configuration context.
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 646f4ccaeee9..5ca14600dcf6 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -2206,9 +2206,6 @@ static inline struct dentry *mount_bdev(struct file_system_type *fs_type,
 	return ERR_PTR(-ENODEV);
 }
 #endif
-extern struct dentry *mount_single(struct file_system_type *fs_type,
-	int flags, void *data,
-	int (*fill_super)(struct super_block *, void *, int));
 extern struct dentry *mount_nodev(struct file_system_type *fs_type,
 	int flags, void *data,
 	int (*fill_super)(struct super_block *, void *, int));


      parent reply	other threads:[~2019-03-21 11:48 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-21 11:47 [RFC PATCH 0/8] Convert mount_single-using filesystems to fs_context David Howells
2019-03-21 11:47 ` [RFC PATCH 1/8] vfs: Add a single-or-reconfig keying to vfs_get_super() David Howells
2019-03-21 11:47 ` [RFC PATCH 2/8] vfs: Convert debugfs to fs_context David Howells
2019-03-21 11:47 ` [RFC PATCH 3/8] vfs: Convert tracefs " David Howells
2019-03-21 12:58   ` Steven Rostedt
2019-03-21 15:49   ` David Howells
2019-03-21 15:59     ` Steven Rostedt
2019-03-21 17:13     ` David Howells
2019-03-21 15:50   ` David Howells
2019-03-21 11:48 ` [RFC PATCH 4/8] vfs: Convert pstore " David Howells
2019-03-21 16:31   ` Kees Cook
2019-03-21 17:03   ` David Howells
2019-03-21 17:35     ` Kees Cook
2019-03-21 11:48 ` [RFC PATCH 5/8] hypfs: Fix error number left in struct pointer member David Howells
2019-03-21 11:48 ` [RFC PATCH 6/8] vfs: Convert hypfs to fs_context David Howells
2019-03-21 11:48 ` [RFC PATCH 7/8] vfs: Convert spufs " David Howells
2019-03-21 11:48 ` David Howells [this message]

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=155316891636.29437.377556597687370007.stgit@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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).