f2fs-tools: fix wrong value of reserve_new_block parameter in page_symlink

In page_symlink, reserve_new_block applies address for data block,
not for inodes. Therefore, is_inode is set to 0.

Signed-off-by: Wang Xiaojun <wangxiaojun11@huawei.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
Wang Xiaojun 2021-07-06 21:10:08 +08:00 committed by Jaegeuk Kim
parent 76d2a9199f
commit 69952e3e23

View File

@ -400,7 +400,7 @@ static void page_symlink(struct f2fs_sb_info *sbi, struct f2fs_node *inode,
memcpy(data_blk, symname, symlen);
set_summary(&sum, ino, 0, ni.version);
ret = reserve_new_block(sbi, &blkaddr, &sum, CURSEG_WARM_DATA, 1);
ret = reserve_new_block(sbi, &blkaddr, &sum, CURSEG_WARM_DATA, 0);
ASSERT(!ret);
ret = dev_write_block(data_blk, blkaddr);