提交 e10d7882 编写于 作者: N Nuno Sá 提交者: Zheng Zengkai

of: overlay: do not break notify on NOTIFY_{OK|STOP}

stable inclusion
from stable-v5.10.121
commit cc68e53f9a7f1044bc2824987a6e45bcb2f97513
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5L6CQ

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=cc68e53f9a7f1044bc2824987a6e45bcb2f97513

--------------------------------

[ Upstream commit 5f756a2e ]

We should not break overlay notifications on NOTIFY_{OK|STOP}
otherwise we might break on the first fragment. We should only stop
notifications if a *real* errno is returned by one of the listeners.

Fixes: a1d19bd4 ("of: overlay: pr_err from return NOTIFY_OK to overlay apply/remove")
Signed-off-by: NNuno Sá <nuno.sa@analog.com>
Signed-off-by: NRob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220420130205.89435-1-nuno.sa@analog.comSigned-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
上级 ac10cf20
......@@ -170,9 +170,7 @@ static int overlay_notify(struct overlay_changeset *ovcs,
ret = blocking_notifier_call_chain(&overlay_notify_chain,
action, &nd);
if (ret == NOTIFY_OK || ret == NOTIFY_STOP)
return 0;
if (ret) {
if (notifier_to_errno(ret)) {
ret = notifier_to_errno(ret);
pr_err("overlay changeset %s notifier error %d, target: %pOF\n",
of_overlay_action_name[action], ret, nd.target);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册