f2fs: avoid m_flags overlay when allocating more data blocks

When more than one data blocks are allocated, the F2FS_MAP_UNWRITTEN/MAPPED
flags will be overlapped by F2FS_MAP_NEW at the later times.

Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
Kinglong Mee 2017-02-23 19:55:05 +08:00 committed by Jaegeuk Kim
parent 6bfaf7b150
commit 3f2be04304
1 changed files with 1 additions and 1 deletions

View File

@ -867,7 +867,7 @@ int f2fs_map_blocks(struct inode *inode, struct f2fs_map_blocks *map,
}
if (err)
goto sync_out;
map->m_flags = F2FS_MAP_NEW;
map->m_flags |= F2FS_MAP_NEW;
blkaddr = dn.data_blkaddr;
} else {
if (flag == F2FS_GET_BLOCK_BMAP) {