Browse Source

f2fs: fix to update variable correctly when skip a unmapped block

map.m_len should be reduced after skip a block

Signed-off-by: Fan li <fanofcode.li@samsung.com>
Reviewed-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Fan Li 9 years ago
parent
commit
e8931582bd
1 changed files with 1 additions and 0 deletions
  1. 1 0
      fs/f2fs/file.c

+ 1 - 0
fs/f2fs/file.c

@@ -1759,6 +1759,7 @@ do_map:
 
 
 		if (!(map.m_flags & F2FS_MAP_FLAGS)) {
 		if (!(map.m_flags & F2FS_MAP_FLAGS)) {
 			map.m_lblk++;
 			map.m_lblk++;
+			map.m_len--;
 			continue;
 			continue;
 		}
 		}