blob: cde895cc4af4cd5053f1a0f477f15c6a1240eedc [file] [log] [blame]
Jan Blunckc5e725f2008-02-14 19:34:31 -08001#ifndef _LINUX_PATH_H
2#define _LINUX_PATH_H
3
4struct dentry;
5struct vfsmount;
6
7struct path {
8 struct vfsmount *mnt;
9 struct dentry *dentry;
Kees Cook3859a272016-10-28 01:22:25 -070010} __randomize_layout;
Jan Blunckc5e725f2008-02-14 19:34:31 -080011
Al Virodcf787f2013-03-01 23:51:07 -050012extern void path_get(const struct path *);
13extern void path_put(const struct path *);
Jan Blunck1d957f92008-02-14 19:34:35 -080014
Miklos Szeredi8df9d1a2010-08-10 11:41:41 +020015static inline int path_equal(const struct path *path1, const struct path *path2)
16{
17 return path1->mnt == path2->mnt && path1->dentry == path2->dentry;
18}
19
Jan Blunckc5e725f2008-02-14 19:34:31 -080020#endif /* _LINUX_PATH_H */