From 7a2cb67867b9a7f28a7c4d0fadd2f337a6d46ff7 Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Thu, 18 Jun 2015 14:17:04 -0700 Subject: f2fs: fix wrong block address calculation for a split extent This patch fixes wrong calculation on block address field when an extent is split. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim --- fs/f2fs/data.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/f2fs/data.c') diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index f71e19a9dd3c..d1d86d53d1dc 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -674,7 +674,7 @@ static void f2fs_update_extent_tree(struct inode *inode, pgoff_t fofs, endofs = dei.fofs + dei.len - 1; if (endofs - fofs >= F2FS_MIN_EXTENT_LEN) { set_extent_info(&ei, fofs + 1, - fofs - dei.fofs + dei.blk, endofs - fofs); + fofs - dei.fofs + dei.blk + 1, endofs - fofs); en2 = __insert_extent_tree(sbi, et, &ei, NULL); } } -- cgit v1.2.3