diff options
author | Lukas Czerner <lczerner@redhat.com> | 2018-10-03 03:18:45 +0200 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2018-10-03 03:18:45 +0200 |
commit | 625ef8a3acd111d5f496d190baf99d1a815bd03e (patch) | |
tree | 1c182c8a21b3d9fa3eb8d362b17f147dfbc015e2 /fs/ext4/inline.c | |
parent | ext4: fix EXT4_IOC_SWAP_BOOT (diff) | |
download | linux-625ef8a3acd111d5f496d190baf99d1a815bd03e.tar.xz linux-625ef8a3acd111d5f496d190baf99d1a815bd03e.zip |
ext4: initialize retries variable in ext4_da_write_inline_data_begin()
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
Diffstat (limited to 'fs/ext4/inline.c')
-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 7b4736022761..9c4bac18cc6c 100644 --- a/fs/ext4/inline.c +++ b/fs/ext4/inline.c @@ -863,7 +863,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) |