diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2022-11-08 17:59:34 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-01-04 11:26:31 +0100 |
commit | db5fc12d8af76867543d6f8ed92db944d6a8fffb (patch) | |
tree | a8b2a3e9e33ddb9ce30b5b3d10343eef38405379 | |
parent | 9035f42b8f4aea2b8f0468e26a1c6ced9ef8aa2b (diff) |
f2fs: allow to read node block after shutdown
commit e6ecb142429183cef4835f31d4134050ae660032 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-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 e06a0c478b39..f168dce9b586 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1358,8 +1358,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; } |