blob: 81e65a5be7ce26f09c3093cd4c1137535294124d [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Jan Blunckc5e725f2008-02-14 19:34:31 -08002#ifndef _LINUX_PATH_H
3#define _LINUX_PATH_H
4
5struct dentry;
6struct vfsmount;
7
8struct path {
9 struct vfsmount *mnt;
10 struct dentry *dentry;
Kees Cook3859a272016-10-28 01:22:25 -070011} __randomize_layout;
Jan Blunckc5e725f2008-02-14 19:34:31 -080012
Al Virodcf787f2013-03-01 23:51:07 -050013extern void path_get(const struct path *);
14extern void path_put(const struct path *);
Jan Blunck1d957f92008-02-14 19:34:35 -080015
Miklos Szeredi8df9d1a2010-08-10 11:41:41 +020016static inline int path_equal(const struct path *path1, const struct path *path2)
17{
18 return path1->mnt == path2->mnt && path1->dentry == path2->dentry;
19}
20
Jan Blunckc5e725f2008-02-14 19:34:31 -080021#endif /* _LINUX_PATH_H */