f2fs: clear PageError on writepage
authorJaegeuk Kim <jaegeuk@kernel.org>
Thu, 12 Apr 2018 06:09:04 +0000 (23:09 -0700)
committerJaegeuk Kim <jaegeuk@google.com>
Tue, 24 Apr 2018 06:14:24 +0000 (23:14 -0700)
Cherry-pick from origin/upstream-f2fs-stable-linux-4.14.y:
commit 0d05d5b2391a ("f2fs: clear PageError on writepage")

This patch clears PageError in some pages tagged by read path, but when we
write the pages with valid contents, writepage should clear the bit likewise
ext4.

Change-Id: I2b089495a565e6ae78e16fec4b81eb2306fcf3c7
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/data.c

index 072a1cf1ee133605e70dd5a78bd807dbfa1e8c8f..96ebf8da4a228e110b7091e837ec793aceb1c014 100644 (file)
@@ -1738,6 +1738,7 @@ got_it:
                        goto out_writepage;
 
                set_page_writeback(page);
+               ClearPageError(page);
                f2fs_put_dnode(&dn);
                if (fio->need_lock == LOCK_REQ)
                        f2fs_unlock_op(fio->sbi);
@@ -1760,6 +1761,7 @@ got_it:
                goto out_writepage;
 
        set_page_writeback(page);
+       ClearPageError(page);
 
        /* LFS mode write path */
        write_data_page(&dn, fio);