]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - fs/mount.h
mnt: Tuck mounts under others instead of creating shadow/side mounts.
[mirror_ubuntu-bionic-kernel.git] / fs / mount.h
index d2e25d7b64b3073c28f37a339b31ac75d275c6f4..2826543a131d1217f306404e264a27a2ee163ec6 100644 (file)
@@ -89,11 +89,16 @@ static inline int is_mounted(struct vfsmount *mnt)
 }
 
 extern struct mount *__lookup_mnt(struct vfsmount *, struct dentry *);
-extern struct mount *__lookup_mnt_last(struct vfsmount *, struct dentry *);
 
 extern int __legitimize_mnt(struct vfsmount *, unsigned);
 extern bool legitimize_mnt(struct vfsmount *, unsigned);
 
+static inline bool __path_is_mountpoint(const struct path *path)
+{
+       struct mount *m = __lookup_mnt(path->mnt, path->dentry);
+       return m && likely(!(m->mnt.mnt_flags & MNT_SYNC_UMOUNT));
+}
+
 extern void __detach_mounts(struct dentry *dentry);
 
 static inline void detach_mounts(struct dentry *dentry)