0001
0002 #ifndef _LINUX_PATH_H
0003 #define _LINUX_PATH_H
0004
0005 struct dentry;
0006 struct vfsmount;
0007
0008 struct path {
0009 struct vfsmount *mnt;
0010 struct dentry *dentry;
0011 } __randomize_layout;
0012
0013 extern void path_get(const struct path *);
0014 extern void path_put(const struct path *);
0015
0016 static inline int path_equal(const struct path *path1, const struct path *path2)
0017 {
0018 return path1->mnt == path2->mnt && path1->dentry == path2->dentry;
0019 }
0020
0021 static inline void path_put_init(struct path *path)
0022 {
0023 path_put(path);
0024 *path = (struct path) { };
0025 }
0026
0027 #endif