提交 f121aade 编写于 作者: M 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: NMiklos Szeredi <mszeredi@redhat.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册