diff options
| author | Lukas Czerner <lczerner@redhat.com> | 2018-10-02 21:18:45 -0400 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2018-12-01 23:16:04 +0100 |
| commit | 6279909f88e857917903ef387c53bc8487c291e4 (patch) | |
| tree | a9fb4031227c247ff86121d36f586ba4060b1757 | |
| parent | 66be4d87e6264d119b033d47204f9866362b3dfc (diff) | |
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>
| -rw-r--r-- | fs/ext4/inline.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c index 3d015c536..04ea6adaa 100644 --- a/fs/ext4/inline.c +++ b/fs/ext4/inline.c @@ -851,7 +851,7 @@ int ext4_da_write_inline_data_begin(struct address_space *mapping, handle_t *handle; struct page *page; struct ext4_iloc iloc; - int retries; + int retries = 0; ret = ext4_get_inode_loc(inode, &iloc); if (ret) |
