ceph: uninitialized variable in debug output
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 7 Mar 2022 14:21:21 +0000 (17:21 +0300)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 21 Mar 2022 12:35:16 +0000 (13:35 +0100)
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>
fs/ceph/addr.c

index 46e0881ae8b2aa0153cee1f0d4b84e3fa2364563..752c421c9922083633bf9c2a5e34c33e9198592d 100644 (file)
@@ -1647,9 +1647,10 @@ int ceph_uninline_data(struct file *file)
        struct ceph_osd_request *req;
        struct ceph_cap_flush *prealloc_cf;
        struct folio *folio = 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)