[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160914061434.24714.490.stgit@pluto.themaw.net>
Date: Wed, 14 Sep 2016 14:14:34 +0800
From: Ian Kent <raven@...maw.net>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: autofs mailing list <autofs@...r.kernel.org>,
Kernel Mailing List <linux-kernel@...r.kernel.org>,
Al Viro <viro@...IV.linux.org.uk>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
Omar Sandoval <osandov@...ndov.com>,
"Eric W. Biederman" <ebiederm@...ssion.com>
Subject: [PATCH 1/4] fs - make is_local_mountpoint() usable by others
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@...maw.net>
Cc: Al Viro <viro@...IV.linux.org.uk>
Cc: Eric W. Biederman <ebiederm@...ssion.com>
Cc: Omar Sandoval <osandov@...ndov.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 */
Powered by blists - more mailing lists