From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Mon, 7 Mar 2022 17:21:21 +0300
Subject: ceph: uninitialized variable in debug output
Git-commit: c38af9825eff8ff76b9d57dd62ebc7ff6050464c
Patch-mainline: v5.18-rc1
References: jsc#SES-1880
If read_mapping_folio() fails then "inline_version" is printed without
being initialized.
[ jlayton: use CEPH_INLINE_NONE instead of "-1" ]
Fixes: 083db6fd3e73 ("ceph: uninline the data on a file opened for writing")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Acked-by: Luis Henriques <lhenriques@suse.com>
---
fs/ceph/addr.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -1644,9 +1644,10 @@ int ceph_uninline_data(struct file *file
struct ceph_osd_request *req;
struct ceph_cap_flush *prealloc_cf;
struct page *page = NULL;
+ u64 inline_version = CEPH_INLINE_NONE;
struct page *pages[1];
- u64 len, inline_version;
int err = 0;
+ u64 len;
prealloc_cf = ceph_alloc_cap_flush();
if (!prealloc_cf)