Commit 6d712a5f authored by Matthew Wilcox (Oracle)'s avatar Matthew Wilcox (Oracle) Committed by Zhihao Cheng
Browse files

nilfs2: Remove check for PageError

stable inclusion
from stable-v4.19.319
commit c158e493640ce76e76241f0529cebe19770ba5b2
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/IAGEKP
CVE: CVE-2024-41034

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=c158e493640ce76e76241f0529cebe19770ba5b2



--------------------------------

[ Upstream commit 79ea6556 ]

If read_mapping_page() encounters an error, it returns an errno, not a
page with PageError set, so this test is not needed.

Signed-off-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
Stable-dep-of: 7373a51e7998 ("nilfs2: fix nilfs_empty_dir() misjudgment and long loop on I/O errors")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarZhihao Cheng <chengzhihao@huaweicloud.com>
parent b9950999
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -200,7 +200,7 @@ static struct page *nilfs_get_page(struct inode *dir, unsigned long n)
	if (!IS_ERR(page)) {
		kmap(page);
		if (unlikely(!PageChecked(page))) {
			if (PageError(page) || !nilfs_check_page(page))
			if (!nilfs_check_page(page))
				goto fail;
		}
	}