projects
/
linux-2.6-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
get rid of ->mnt_longterm
[linux-2.6-block.git]
/
fs
/
mount.h
diff --git
a/fs/mount.h
b/fs/mount.h
index 4ef36d93e5a241822e10c21f93dc72d7137d32ec..05a2a1185efcf2e560012c33042ceb8c406dc119 100644
(file)
--- a/
fs/mount.h
+++ b/
fs/mount.h
@@
-22,7
+22,6
@@
struct mount {
struct vfsmount mnt;
#ifdef CONFIG_SMP
struct mnt_pcp __percpu *mnt_pcp;
struct vfsmount mnt;
#ifdef CONFIG_SMP
struct mnt_pcp __percpu *mnt_pcp;
- atomic_t mnt_longterm; /* how many of the refs are longterm */
#else
int mnt_count;
int mnt_writers;
#else
int mnt_count;
int mnt_writers;
@@
-49,6
+48,8
@@
struct mount {
int mnt_ghosts;
};
int mnt_ghosts;
};
+#define MNT_NS_INTERNAL ERR_PTR(-EINVAL) /* distinct from any mnt_namespace */
+
static inline struct mount *real_mount(struct vfsmount *mnt)
{
return container_of(mnt, struct mount, mnt);
static inline struct mount *real_mount(struct vfsmount *mnt)
{
return container_of(mnt, struct mount, mnt);
@@
-59,6
+60,12
@@
static inline int mnt_has_parent(struct mount *mnt)
return mnt != mnt->mnt_parent;
}
return mnt != mnt->mnt_parent;
}
+static inline int is_mounted(struct vfsmount *mnt)
+{
+ /* neither detached nor internal? */
+ return !IS_ERR_OR_NULL(real_mount(mnt));
+}
+
extern struct mount *__lookup_mnt(struct vfsmount *, struct dentry *, int);
static inline void get_mnt_ns(struct mnt_namespace *ns)
extern struct mount *__lookup_mnt(struct vfsmount *, struct dentry *, int);
static inline void get_mnt_ns(struct mnt_namespace *ns)