mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-28 13:22:57 +00:00
fs: Fix error checking for d_hash_and_lookup()
[ Upstream commit0d5a4f8f77
] The d_hash_and_lookup() function returns error pointers or NULL. Most incorrect error checks were fixed, but the one in int path_pts() was forgotten. Fixes:eedf265aa0
("devpts: Make each mount of devpts an independent filesystem.") Signed-off-by: Wang Ming <machel@vivo.com> Message-Id: <20230713120555.7025-1-machel@vivo.com> Signed-off-by: Christian Brauner <brauner@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
9ecf74a6f4
commit
077c70b3ce
1 changed files with 1 additions and 1 deletions
|
@ -2615,7 +2615,7 @@ int path_pts(struct path *path)
|
||||||
this.name = "pts";
|
this.name = "pts";
|
||||||
this.len = 3;
|
this.len = 3;
|
||||||
child = d_hash_and_lookup(parent, &this);
|
child = d_hash_and_lookup(parent, &this);
|
||||||
if (!child)
|
if (IS_ERR_OR_NULL(child))
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
|
|
||||||
path->dentry = child;
|
path->dentry = child;
|
||||||
|
|
Loading…
Reference in a new issue