All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: David Howells <dhowells@redhat.com>,
	Christian Brauner <christian@brauner.io>
Cc: linux-fsdevel@vger.kernel.org, Al Viro <viro@ZenIV.linux.org.uk>,
	Miklos Szeredi <miklos@szeredi.hu>
Subject: [RFC 5/6] fs: expose internal interfaces open_detached_copy and do_reconfigure_mount
Date: Wed, 27 Nov 2019 12:37:21 -0800	[thread overview]
Message-ID: <1574887041.21593.12.camel@HansenPartnership.com> (raw)
In-Reply-To: <1574886778.21593.7.camel@HansenPartnership.com>

These are needed for the forthcoming bind configure type to work.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
---
 fs/internal.h  | 3 +++
 fs/namespace.c | 4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/fs/internal.h b/fs/internal.h
index e3039de79134..f27136058d7d 100644
--- a/fs/internal.h
+++ b/fs/internal.h
@@ -95,6 +95,9 @@ extern void dissolve_on_fput(struct vfsmount *);
 int fsopen_cf_get(const struct configfd_context *cfc,
 		  struct configfd_param *p);
 
+extern int do_reconfigure_mnt(struct path *path, unsigned int mnt_flags);
+extern struct file *open_detached_copy(struct path *path, bool recursive);
+
 /*
  * fs_struct.c
  */
diff --git a/fs/namespace.c b/fs/namespace.c
index 13be853e9225..9dcbafe62e4e 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -2318,7 +2318,7 @@ static int do_loopback(struct path *path, const char *old_name,
 	return err;
 }
 
-static struct file *open_detached_copy(struct path *path, bool recursive)
+struct file *open_detached_copy(struct path *path, bool recursive)
 {
 	struct user_namespace *user_ns = current->nsproxy->mnt_ns->user_ns;
 	struct mnt_namespace *ns = alloc_mnt_ns(user_ns, true);
@@ -2494,7 +2494,7 @@ static void mnt_warn_timestamp_expiry(struct path *mountpoint, struct vfsmount *
  * superblock it refers to.  This is triggered by specifying MS_REMOUNT|MS_BIND
  * to mount(2).
  */
-static int do_reconfigure_mnt(struct path *path, unsigned int mnt_flags)
+int do_reconfigure_mnt(struct path *path, unsigned int mnt_flags)
 {
 	struct super_block *sb = path->mnt->mnt_sb;
 	struct mount *mnt = real_mount(path->mnt);
-- 
2.16.4


  parent reply	other threads:[~2019-11-27 20:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-21  0:11 Feature bug with the new mount API: no way of doing read only bind mounts James Bottomley
2019-11-21  8:10 ` David Howells
2019-11-21 14:54   ` Christian Brauner
2019-11-21 15:04     ` David Howells
2019-11-21 15:00   ` James Bottomley
2019-11-21 16:15   ` James Bottomley
2019-11-27 20:32     ` James Bottomley
2019-11-27 20:33       ` [RFC 1/6] logger: add a limited buffer logging facility James Bottomley
2019-11-27 20:34       ` [RFC 2/6] configfd: add generic file descriptor based configuration parser James Bottomley
2019-11-27 20:35       ` [RFC 3/6] configfd: syscall: wire up configfd syscalls James Bottomley
2019-11-27 20:36       ` [RFC 4/6] fs: implement fsconfig via configfd James Bottomley
2019-11-27 20:37       ` James Bottomley [this message]
2019-11-27 20:38       ` [RFC 6/6] fs: bind: add configfs type for bind mounts James Bottomley

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=1574887041.21593.12.camel@HansenPartnership.com \
    --to=james.bottomley@hansenpartnership.com \
    --cc=christian@brauner.io \
    --cc=dhowells@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.