Patch "f2fs: add cp_error check in f2fs_write_compressed_pages" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    f2fs: add cp_error check in f2fs_write_compressed_pages

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     f2fs-add-cp_error-check-in-f2fs_write_compressed_pag.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 655611d1e3aacbb2a1b7997e87505c4157e1aa8e
Author: Chao Yu <chao@xxxxxxxxxx>
Date:   Tue Apr 27 11:07:30 2021 +0800

    f2fs: add cp_error check in f2fs_write_compressed_pages
    
    [ Upstream commit ee68d27181f060fab29e60d1d31aab6a42703dd4 ]
    
    This patch adds cp_error check in f2fs_write_compressed_pages() like we did
    in f2fs_write_single_data_page()
    
    Signed-off-by: Chao Yu <yuchao0@xxxxxxxxxx>
    Signed-off-by: Jaegeuk Kim <jaegeuk@xxxxxxxxxx>
    Stable-dep-of: 278a6253a673 ("f2fs: fix to relocate check condition in f2fs_fallocate()")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
index be6f2988ac7fc..9dc2e09f0a60d 100644
--- a/fs/f2fs/compress.c
+++ b/fs/f2fs/compress.c
@@ -1161,6 +1161,12 @@ static int f2fs_write_compressed_pages(struct compress_ctx *cc,
 	loff_t psize;
 	int i, err;
 
+	/* we should bypass data pages to proceed the kworkder jobs */
+	if (unlikely(f2fs_cp_error(sbi))) {
+		mapping_set_error(cc->rpages[0]->mapping, -EIO);
+		goto out_free;
+	}
+
 	if (IS_NOQUOTA(inode)) {
 		/*
 		 * We need to wait for node_write to avoid block allocation during




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux