diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2021-07-26 19:12:15 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2021-08-02 21:24:25 +0300 |
commit | b7ec2061737f12c33e45beeb967d17f31abc1ada (patch) | |
tree | 33cd235ee33311c33d8b862d7bf06e7ec6633514 /fs/f2fs/node.c | |
parent | 7eab7a6968278c735b1ca6387056a408f7960265 (diff) | |
download | linux-b7ec2061737f12c33e45beeb967d17f31abc1ada.tar.xz |
f2fs: do not submit NEW_ADDR to read node block
After the below patch, give cp is errored, we drop dirty node pages. This
can give NEW_ADDR to read node pages. Don't do WARN_ON() which gives
generic/475 failure.
Fixes: 28607bf3aa6f ("f2fs: drop dirty node pages when cp is in error status")
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/node.c')
-rw-r--r-- | fs/f2fs/node.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index c945a9730f3c..5840b82ce311 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1330,7 +1330,8 @@ static int read_node_page(struct page *page, int op_flags) if (err) return err; - if (unlikely(ni.blk_addr == NULL_ADDR) || + /* NEW_ADDR can be seen, after cp_error drops some dirty node pages */ + if (unlikely(ni.blk_addr == NULL_ADDR || ni.blk_addr == NEW_ADDR) || is_sbi_flag_set(sbi, SBI_IS_SHUTDOWN)) { ClearPageUptodate(page); return -ENOENT; |