]> git.baikalelectronics.ru Git - kernel.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)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 1 Dec 2021 16:08:26 +0000 (17:08 +0100)
commit58d719a385030c273e05a987859ac7c6211615f3
tree3bfbdc354c549b6ccdb60eab49ce3092481a063e
parent8d8d080219c6b6e5a89e5bf472ecb0ba2439cf1a
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: 3588a96f82dd ("ceph: return the real size read when it hits EOF")
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/file.c