Commit f121aade authored by Miklos Szeredi's avatar Miklos Szeredi

vfs: add path_put_init()

This one initializes the struct path to all zeroes so that multiple
path_put_init() on the path is safe.
Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
parent f30536f0
......@@ -18,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 */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment