diff options
author | Lukas Czerner <lczerner@redhat.com> | 2018-10-03 04:18:45 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-11-13 22:15:06 +0300 |
commit | 13b63ba40348d9c43c3842632d3f371a97ca5fe4 (patch) | |
tree | 5561e250b6362de694d65a8d5e05b2567e5cc852 /fs | |
parent | 63be2065bf4d66c50d3d43935c4687d25642dbbd (diff) | |
download | linux-13b63ba40348d9c43c3842632d3f371a97ca5fe4.tar.xz |
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>
Diffstat (limited to 'fs')
-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 4e1d62ba0703..ac2e0516c16f 100644 --- a/fs/ext4/inline.c +++ b/fs/ext4/inline.c @@ -869,7 +869,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) |