diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2016-12-16 22:34:52 +0100 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-12-16 22:34:52 +0100 |
commit | 9763f7a4a5f7b1a7c480fa06d01b2bad25163c0a (patch) | |
tree | 63e3f777b699ec26761eab948c40d70bba1476b0 /fs/mount.h | |
parent | Merge remote-tracking branch 'djwong/ocfs2-vfs-reflink-6' into for-linus (diff) | |
parent | autofs - dont hold spin lock over direct mount expire (diff) | |
download | linux-9763f7a4a5f7b1a7c480fa06d01b2bad25163c0a.tar.xz linux-9763f7a4a5f7b1a7c480fa06d01b2bad25163c0a.zip |
Merge branch 'work.autofs' into for-linus
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/mount.h')
-rw-r--r-- | fs/mount.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/mount.h b/fs/mount.h index d2e25d7b64b3..2c856fc47ae3 100644 --- a/fs/mount.h +++ b/fs/mount.h @@ -94,6 +94,12 @@ 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) |