forked from Minki/linux
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: Miklos Szeredi <mszeredi@redhat.com>
This commit is contained in:
parent
f30536f0f9
commit
f121aadede
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user