ceph: initialize pathlen variable in reconnect_caps_cb
stable inclusion from stable-v5.10.88 commit 7b4cc168d9ca3eb004969b413c0e0bd08a1fef4d bugzilla: 186058 https://gitee.com/openeuler/kernel/issues/I4QW6A Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=7b4cc168d9ca3eb004969b413c0e0bd08a1fef4d -------------------------------- [ Upstream commit ee2a095d ] The smatch static checker warned about an uninitialized symbol usage in this function, in the case where ceph_mdsc_build_path returns an error. It turns out that that case is harmless, but it just looks sketchy. Initialize the variable at declaration time, and remove the unneeded setting of it later. Fixes: a33f6432 ("ceph: encode inodes' parent/d_name in cap reconnect message") Reported-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NXiubo Li <xiubli@redhat.com> Reviewed-by: NJeff Layton <jlayton@kernel.org> Signed-off-by: NIlya Dryomov <idryomov@gmail.com> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Showing
想要评论请 注册 或 登录