[PATCH openEuler-1.0-LTS] Revert "NFS: Don't interrupt file writeout due to fatal errors"

hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IAJ2ZJ -------------------------------- This reverts commit 812ffba3b83c86bba38fd087fa41fe2f08f7acb6. Commit 812ffba3b83c ("NFS: Don't interrupt file writeout due to fatal errors") tries to keep writing back when hit fatal errors. However, since page->mapping will be set as NULL in nfs_write_error_remove_page() and it will be used in nfs_create_request(), null-ptr-deref will be triggered if we don't stop it immediately. Fixes: 812ffba3b83c ("NFS: Don't interrupt file writeout due to fatal errors") Signed-off-by: Li Lingfeng <lilingfeng3@huawei.com> --- fs/nfs/write.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfs/write.c b/fs/nfs/write.c index e4b1ce488637..706ed79e23e2 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -662,7 +662,7 @@ static int nfs_page_async_flush(struct nfs_pageio_descriptor *pgio, return ret; out_launder: nfs_write_error_remove_page(req); - return 0; + return ret; } static int nfs_do_writepage(struct page *page, struct writeback_control *wbc, -- 2.31.1

反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/10865 邮件列表地址:https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/W... FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://gitee.com/openeuler/kernel/pulls/10865 Mailing list address: https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/W...
participants (2)
-
Li Lingfeng
-
patchwork bot