add patch fix-potential-use-after-free-after-remounting-with-noblock_validity
[ext4-patch-queue.git] / fix-warning-inside-ext4_convert_unwritten_extents_endio
blob1b217fb84fff1e8fadfde1c42827862bd6243431
1 ext4: fix warning inside ext4_convert_unwritten_extents_endio
3 From: Rakesh Pandit <rakesh@tuxera.com>
5 Really enable warning when CONFIG_EXT4_DEBUG is set and fix missing
6 first argument.  This was introduced in commit ff95ec22cd7f ("ext4:
7 add warning to ext4_convert_unwritten_extents_endio") and splitting
8 extents inside endio would trigger it.
10 Fixes: ff95ec22cd7f ("ext4: add warning to ext4_convert_unwritten_extents_endio")
11 Signed-off-by: Rakesh Pandit <rakesh@tuxera.com>
12 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
13 Cc: stable@kernel.org
14 ---
15  fs/ext4/extents.c | 4 ++--
16  1 file changed, 2 insertions(+), 2 deletions(-)
18 diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
19 index 92266a2da7d6..f203bf989a4c 100644
20 --- a/fs/ext4/extents.c
21 +++ b/fs/ext4/extents.c
22 @@ -3813,8 +3813,8 @@ static int ext4_convert_unwritten_extents_endio(handle_t *handle,
23          * illegal.
24          */
25         if (ee_block != map->m_lblk || ee_len > map->m_len) {
26 -#ifdef EXT4_DEBUG
27 -               ext4_warning("Inode (%ld) finished: extent logical block %llu,"
28 +#ifdef CONFIG_EXT4_DEBUG
29 +               ext4_warning(inode->i_sb, "Inode (%ld) finished: extent logical block %llu,"
30                              " len %u; IO logical block %llu, len %u",
31                              inode->i_ino, (unsigned long long)ee_block, ee_len,
32                              (unsigned long long)map->m_lblk, map->m_len);
33 -- 
34 2.17.1