All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] fs - make is_local_mountpoint() usable by others
@ 2016-09-14  6:14 ` Ian Kent
  0 siblings, 0 replies; 52+ messages in thread
From: Ian Kent @ 2016-09-14  6:14 UTC (permalink / raw)
  To: Andrew Morton
  Cc: autofs mailing list, Kernel Mailing List, Al Viro, linux-fsdevel,
	Omar Sandoval, Eric W. Biederman

The is_local_mountpoint() function will be needed for autofs
to check if a dentry is a mountpoint in the current namespace.

Signed-off-by: Ian Kent <raven@themaw.net>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Omar Sandoval <osandov@osandov.com>
---
 fs/mount.h            |    9 ---------
 fs/namespace.c        |    1 +
 include/linux/mount.h |    9 +++++++++
 3 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/fs/mount.h b/fs/mount.h
index 14db05d..c25e6e8 100644
--- a/fs/mount.h
+++ b/fs/mount.h
@@ -127,12 +127,3 @@ struct proc_mounts {
 };
 
 extern const struct seq_operations mounts_op;
-
-extern bool __is_local_mountpoint(struct dentry *dentry);
-static inline bool is_local_mountpoint(struct dentry *dentry)
-{
-	if (!d_mountpoint(dentry))
-		return false;
-
-	return __is_local_mountpoint(dentry);
-}
diff --git a/fs/namespace.c b/fs/namespace.c
index 7bb2cda..bea1507 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -725,6 +725,7 @@ bool __is_local_mountpoint(struct dentry *dentry)
 out:
 	return is_covered;
 }
+EXPORT_SYMBOL(__is_local_mountpoint);
 
 static struct mountpoint *lookup_mountpoint(struct dentry *dentry)
 {
diff --git a/include/linux/mount.h b/include/linux/mount.h
index 54a594d..575b745 100644
--- a/include/linux/mount.h
+++ b/include/linux/mount.h
@@ -15,6 +15,7 @@
 #include <linux/spinlock.h>
 #include <linux/seqlock.h>
 #include <linux/atomic.h>
+#include <linux/dcache.h>
 
 struct super_block;
 struct vfsmount;
@@ -96,4 +97,12 @@ extern void mark_mounts_for_expiry(struct list_head *mounts);
 
 extern dev_t name_to_dev_t(const char *name);
 
+extern bool __is_local_mountpoint(struct dentry *dentry);
+static inline bool is_local_mountpoint(struct dentry *dentry)
+{
+	if (!d_mountpoint(dentry))
+		return false;
+
+	return __is_local_mountpoint(dentry);
+}
 #endif /* _LINUX_MOUNT_H */

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

end of thread, other threads:[~2016-09-28 10:18 UTC | newest]

Thread overview: 52+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-14  6:14 [PATCH 1/4] fs - make is_local_mountpoint() usable by others Ian Kent
2016-09-14  6:14 ` Ian Kent
2016-09-14  6:14 ` [PATCH 2/4] fs - add have_local_submounts() Ian Kent
2016-09-14  6:14 ` [PATCH 3/4] autofs - make mountpoint checks namespace aware Ian Kent
2016-09-14 17:28   ` Eric W. Biederman
2016-09-15  0:09     ` Ian Kent
2016-09-15  0:09       ` Ian Kent
2016-09-15  0:32       ` Omar Sandoval
2016-09-15  2:08       ` Eric W. Biederman
2016-09-15  2:08         ` Eric W. Biederman
2016-09-15  4:12         ` Ian Kent
2016-09-15  4:12           ` Ian Kent
2016-09-15  8:19           ` Ian Kent
2016-09-16  0:47           ` Eric W. Biederman
2016-09-16  0:47             ` Eric W. Biederman
2016-09-16  2:58             ` Ian Kent
2016-09-19  0:58               ` Ian Kent
2016-09-19  0:58                 ` Ian Kent
2016-09-20 16:09                 ` Eric W. Biederman
2016-09-20 16:09                   ` Eric W. Biederman
2016-09-15  1:03     ` Ian Kent
2016-09-15  1:03       ` Ian Kent
2016-09-16 21:14   ` Omar Sandoval
2016-09-16 21:14     ` Omar Sandoval
2016-09-17 20:10   ` Mateusz Guzik
2016-09-17 20:10     ` Mateusz Guzik
2016-09-19  1:36     ` Ian Kent
2016-09-19  1:36       ` Ian Kent
2016-09-20 16:50       ` Eric W. Biederman
2016-09-20 22:44         ` Ian Kent
2016-09-20 23:00           ` Ian Kent
2016-09-20 23:00             ` Ian Kent
2016-09-22  1:33             ` Ian Kent
2016-09-22  1:33               ` Ian Kent
2016-09-22 15:43               ` Eric W. Biederman
2016-09-23  0:55                 ` Ian Kent
2016-09-23  0:55                   ` Ian Kent
2016-09-23  1:37                   ` Eric W. Biederman
2016-09-23  4:26                     ` Ian Kent
2016-09-23 12:00                       ` Ian Kent
2016-09-28 10:18                         ` Ian Kent
2016-09-23 19:15                       ` Eric W. Biederman
2016-09-24  0:11                         ` Ian Kent
2016-09-26 16:05                           ` Eric W. Biederman
2016-09-27  1:52                             ` Ian Kent
2016-09-27  1:52                               ` Ian Kent
2016-09-27 13:14                               ` Eric W. Biederman
2016-09-27 13:14                                 ` Eric W. Biederman
2016-09-28  0:19                                 ` Ian Kent
2016-09-28  0:19                                   ` Ian Kent
2016-09-14  6:14 ` [PATCH 4/4] fs - remove unused have_submounts() function Ian Kent
2016-09-14  6:14   ` Ian Kent

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.