]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
ceph: initialize i_size variable in ceph_sync_read
authorJeff Layton <jlayton@kernel.org>
Tue, 23 Nov 2021 12:30:38 +0000 (07:30 -0500)
committerJeff Layton <jlayton@kernel.org>
Tue, 23 Nov 2021 13:01:16 +0000 (08:01 -0500)
commitf5eb49a833068d749eae10a5af8402397de67377
tree87949fe6e70aef37d9c2bb533548131e1dd85b91
parent9d89c5df91d8f2f90caba9f9dd6b92513672e669
ceph: initialize i_size variable in ceph_sync_read

Newer compilers seem to determine that this variable being uninitialized
isn't a problem, but older compilers (from the RHEL8 era) seem to choke
on it and complain that it could be used uninitialized.

Go ahead and initialize the variable at declaration time to silence
potential compiler warnings.

Fixes: c3d8e0b5de48 ("ceph: return the real size read when it hits EOF")
Reviewed-by: Xiubo Li <xiubli@redhat.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
fs/ceph/file.c