Commit bbd3efed authored by Jaegeuk Kim's avatar Jaegeuk Kim

f2fs: skip adding a discard command if exists

When recovering zoned UFS, sometimes we add the same zone to discard multiple
times. Simple workaround is to bypass adding it.
Reviewed-by: default avatarChao Yu <chao@kernel.org>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 956fa1dd
...@@ -1380,7 +1380,8 @@ static void __insert_discard_cmd(struct f2fs_sb_info *sbi, ...@@ -1380,7 +1380,8 @@ static void __insert_discard_cmd(struct f2fs_sb_info *sbi,
p = &(*p)->rb_right; p = &(*p)->rb_right;
leftmost = false; leftmost = false;
} else { } else {
f2fs_bug_on(sbi, 1); /* Let's skip to add, if exists */
return;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment