Skip to content

Commit

Permalink
ceph: uninitialized variable in debug output
Browse files Browse the repository at this point in the history
If read_mapping_folio() fails then "inline_version" is printed without
being initialized.

[ jlayton: use CEPH_INLINE_NONE instead of "-1" ]

Fixes: 083db6f ("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>
  • Loading branch information
Dan Carpenter authored and Ilya Dryomov committed Mar 21, 2022
1 parent 271251f commit c38af98
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/ceph/addr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c38af98

Please sign in to comment.