aboutsummaryrefslogtreecommitdiffstats
path: root/fs/mount.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/mount.h')
-rw-r--r--fs/mount.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/mount.h b/fs/mount.h
index 4ef36d93e5a2..05a2a1185efc 100644
--- a/fs/mount.h
+++ b/fs/mount.h
@@ -22,7 +22,6 @@ struct mount {
22 struct vfsmount mnt; 22 struct vfsmount mnt;
23#ifdef CONFIG_SMP 23#ifdef CONFIG_SMP
24 struct mnt_pcp __percpu *mnt_pcp; 24 struct mnt_pcp __percpu *mnt_pcp;
25 atomic_t mnt_longterm; /* how many of the refs are longterm */
26#else 25#else
27 int mnt_count; 26 int mnt_count;
28 int mnt_writers; 27 int mnt_writers;
@@ -49,6 +48,8 @@ struct mount {
49 int mnt_ghosts; 48 int mnt_ghosts;
50}; 49};
51 50
51#define MNT_NS_INTERNAL ERR_PTR(-EINVAL) /* distinct from any mnt_namespace */
52
52static inline struct mount *real_mount(struct vfsmount *mnt) 53static inline struct mount *real_mount(struct vfsmount *mnt)
53{ 54{
54 return container_of(mnt, struct mount, mnt); 55 return container_of(mnt, struct mount, mnt);
@@ -59,6 +60,12 @@ static inline int mnt_has_parent(struct mount *mnt)
59 return mnt != mnt->mnt_parent; 60 return mnt != mnt->mnt_parent;
60} 61}
61 62
63static inline int is_mounted(struct vfsmount *mnt)
64{
65 /* neither detached nor internal? */
66 return !IS_ERR_OR_NULL(real_mount(mnt));
67}
68
62extern struct mount *__lookup_mnt(struct vfsmount *, struct dentry *, int); 69extern struct mount *__lookup_mnt(struct vfsmount *, struct dentry *, int);
63 70
64static inline void get_mnt_ns(struct mnt_namespace *ns) 71static inline void get_mnt_ns(struct mnt_namespace *ns)