]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
fs: Fix error checking for d_hash_and_lookup()
authorWang Ming <machel@vivo.com>
Thu, 13 Jul 2023 12:05:42 +0000 (20:05 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Sep 2023 07:47:57 +0000 (09:47 +0200)
commitc8ca04de0f8abaafd42356296620a9356500f47e
treeebedb092c51751a4de43eb979633a4bd9acd7ab0
parent5c0dd959b635ae336a7511e96230b5a4eb9ee4e8
fs: Fix error checking for d_hash_and_lookup()

[ Upstream commit 0d5a4f8f775ff990142cdc810a84eae078589d27 ]

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: eedf265aa003 ("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>
fs/namei.c