ext4: initialize retries variable in ext4_da_write_inline_data_begin()
authorLukas Czerner <lczerner@redhat.com>
Wed, 3 Oct 2018 01:18:45 +0000 (21:18 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Nov 2018 19:16:56 +0000 (11:16 -0800)
commit4c196200e6fad222c78caf32da421b8ae4283761
tree3d8581b9dbca63f0331945da66a5a7c305f18bee
parent4b347ab6ee3c018c3007cb87fc4a8b1e4dd285e0
ext4: initialize retries variable in ext4_da_write_inline_data_begin()

commit 625ef8a3acd111d5f496d190baf99d1a815bd03e upstream.

Variable retries is not initialized in ext4_da_write_inline_data_begin()
which can lead to nondeterministic number of retries in case we hit
ENOSPC. Initialize retries to zero as we do everywhere else.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Fixes: bc0ca9df3b2a ("ext4: retry allocation when inline->extent conversion failed")
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/inline.c