vfs: Don't allow overwriting mounts in the current mount namespace
[linux-2.6-block.git] / fs / mount.h
index 8f2a14ae38a20ea8132316a9c7573ecb3ed156b1..8c6a2a65125415854590b8a8d1952f26e5bd4bdd 100644 (file)
@@ -115,3 +115,12 @@ struct proc_mounts {
 #define proc_mounts(p) (container_of((p), struct proc_mounts, m))
 
 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);
+}