diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2022-11-09 02:59:34 +0100 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2022-11-11 18:47:58 +0100 |
commit | e6ecb142429183cef4835f31d4134050ae660032 (patch) | |
tree | 3136c39690821dcecaa86ea20f990c3983d83565 /fs/f2fs/node.c | |
parent | f2fs: replace ternary operator with max() (diff) | |
download | linux-e6ecb142429183cef4835f31d4134050ae660032.tar.xz linux-e6ecb142429183cef4835f31d4134050ae660032.zip |
f2fs: allow to read node block after shutdown
If block address is still alive, we should give a valid node block even after
shutdown. Otherwise, we can see zero data when reading out a file.
Cc: stable@vger.kernel.org
Fixes: 83a3bfdb5a8a ("f2fs: indicate shutdown f2fs to allow unmount successfully")
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, 1 insertions, 2 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 983572f23896..b9ee5a1176a0 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1360,8 +1360,7 @@ static int read_node_page(struct page *page, blk_opf_t op_flags) return err; /* 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)) { + if (unlikely(ni.blk_addr == NULL_ADDR || ni.blk_addr == NEW_ADDR)) { ClearPageUptodate(page); return -ENOENT; } |