ext4: do not polute the extents cache while shifting extents
authorRoman Pen <roman.penyaev@profitbricks.com>
Mon, 9 Jan 2017 02:00:35 +0000 (21:00 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 9 Jan 2017 02:00:35 +0000 (21:00 -0500)
commit03e916fa8b5577d85471452a3d0c5738aa658dae
treeb9e3cfbd5a760263d3023766e57acf56ecd51866
parent2a9b8cba62c0741109c33a2be700ff3d7703a7c2
ext4: do not polute the extents cache while shifting extents

Inside ext4_ext_shift_extents() function ext4_find_extent() is called
without EXT4_EX_NOCACHE flag, which should prevent cache population.

This leads to oudated offsets in the extents tree and wrong blocks
afterwards.

Patch fixes the problem providing EXT4_EX_NOCACHE flag for each
ext4_find_extents() call inside ext4_ext_shift_extents function.

Fixes: 331573febb6a2
Signed-off-by: Roman Pen <roman.penyaev@profitbricks.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: Namjae Jeon <namjae.jeon@samsung.com>
Cc: Andreas Dilger <adilger.kernel@dilger.ca>
Cc: stable@vger.kernel.org
fs/ext4/extents.c