aboutsummaryrefslogtreecommitdiff
path: root/include/linux/path.h
diff options
context:
space:
mode:
authorTony Lindgren <[email protected]>2017-11-28 07:06:34 -0800
committerTony Lindgren <[email protected]>2017-11-28 07:06:34 -0800
commit2db57789e6612ce0cf2fcbb577a1c8307b708566 (patch)
treedd9f9e3dffabbf5cb932fcf5055ab329ca940fa0 /include/linux/path.h
parentf0c96c6d40312b1a76cd36709dc3eb5948c1b97f (diff)
parente9a9bb4e4779ca74cb52a6e2f8acbc0881d3bb18 (diff)
Merge branch 'soc-fixes' into omap-for-v4.15/fixes
Diffstat (limited to 'include/linux/path.h')
-rw-r--r--include/linux/path.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/path.h b/include/linux/path.h
index cde895cc4af4..475225a03d0d 100644
--- a/include/linux/path.h
+++ b/include/linux/path.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _LINUX_PATH_H
#define _LINUX_PATH_H
@@ -17,4 +18,10 @@ static inline int path_equal(const struct path *path1, const struct path *path2)
return path1->mnt == path2->mnt && path1->dentry == path2->dentry;
}
+static inline void path_put_init(struct path *path)
+{
+ path_put(path);
+ *path = (struct path) { };
+}
+
#endif /* _LINUX_PATH_H */