ext4: initialize retries variable in ext4_da_write_inline_data_begin()
Quoted 5 lines · Jan Kara
Quoted 4 lines · Lukas Czerner
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.
Quoted 8 lines
Quoted 6 lines
Signed-off-by Lukas Czerner <[email protected]>Fixes bc0ca9df3b2a ("ext4: retry allocation when inline->extent conversion failed")--- fs/ext4/inline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Ted, this seems to have fallen through the cracks...
Yeah it did, Ted can you pick this up ?
-Lukas
Quoted 23 lines
Honza
Quoted 17 lines
fs/ext4/inline.c +1
-1@@ -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)Signature · 1 line
2.17.1Signature · 2 lines
Jan Kara <[email protected]> SUSE Labs, CR
Theodore Y. Ts'o
AppliedQuoted 7 lines · Lukas Czerner
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 <[email protected]>Fixes bc0ca9df3b2a ("ext4: retry allocation when inline->extent conversion failed")
Applied, thanks.
- Ted