]> git.baikalelectronics.ru Git - kernel.git/commit
f2fs: exclude special cases for f2fs_move_file_range
authorFan Li <fanofcode.li@samsung.com>
Tue, 13 Sep 2016 03:35:42 +0000 (11:35 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Wed, 14 Sep 2016 23:52:06 +0000 (16:52 -0700)
commit6f217e70ac80412c94a2b50908c70397c862c2ef
tree5e13c3ab75763209a936a16e1bbf00caba2f7c43
parent7acbd8679d20fd65569d85cdead17d0e0db3535f
f2fs: exclude special cases for f2fs_move_file_range

When src and dst is the same file, and the latter part of source region
overlaps with the former part of destination region, current implement
will overwrite data which hasn't been moved yet and truncate data in
overlapped region.
This patch return -EINVAL when such cases occur and return 0 when
source region and destination region is actually the same part of
the same file.

Signed-off-by: Fan li <fanofcode.li@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/file.c