fs: orangefs: fix error return code of orangefs_revalidate_lookup()
authorJia-Ju Bai <baijiaju1990@gmail.com>
Tue, 9 Mar 2021 08:00:20 +0000 (00:00 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Nov 2021 18:17:01 +0000 (19:17 +0100)
commitd268e0125c929eca42f1ea1db79bf23c73894231
tree9d51b97b6a430d810b45c0959253dea047eeff1f
parenta94284b0fdce9bc5a3a42ff3334223a9d7f84d91
fs: orangefs: fix error return code of orangefs_revalidate_lookup()

[ Upstream commit 4c2b46c824a78fc8190d8eafaaea5a9078fe7479 ]

When op_alloc() returns NULL to new_op, no error return code of
orangefs_revalidate_lookup() is assigned.
To fix this bug, ret is assigned with -ENOMEM in this case.

Fixes: 8bb8aefd5afb ("OrangeFS: Change almost all instances of the string PVFS2 to OrangeFS.")
Reported-by: TOTE Robot <oslab@tsinghua.edu.cn>
Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/orangefs/dcache.c