diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2023-11-13 18:51:57 -0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2023-11-20 09:00:24 -0800 |
commit | bbd3efed3383e332191c665786c61653826d2ac3 (patch) | |
tree | 5b988cb19853384822b0caa38f51894e8ea4cbd4 /fs/f2fs/segment.c | |
parent | 956fa1ddc132e028f3b7d4cf17e6bfc8cb36c7fd (diff) | |
download | linux-stable-bbd3efed3383e332191c665786c61653826d2ac3.tar.gz linux-stable-bbd3efed3383e332191c665786c61653826d2ac3.tar.bz2 linux-stable-bbd3efed3383e332191c665786c61653826d2ac3.zip |
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: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/segment.c')
-rw-r--r-- | fs/f2fs/segment.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 727d016318f9..f4ffd64b44b2 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -1380,7 +1380,8 @@ static void __insert_discard_cmd(struct f2fs_sb_info *sbi, p = &(*p)->rb_right; leftmost = false; } else { - f2fs_bug_on(sbi, 1); + /* Let's skip to add, if exists */ + return; } } |