From: Anders Grafström Date: Tue, 4 Aug 2009 11:11:47 +0000 (+0200) Subject: jffs2: Fix return value from jffs2_do_readpage_nolock() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=57ca7deb062abf56168d15f000c16e25f88a9cf3;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git jffs2: Fix return value from jffs2_do_readpage_nolock() This fixes "kernel BUG at fs/jffs2/file.c:251!". This pseudocode hopefully illustrates the scenario that triggers it: jffs2_write_begin { jffs2_do_readpage_nolock { jffs2_read_inode_range { jffs2_read_dnode { Data CRC 33c102e9 != calculated CRC 0ef77e7b for node at 005d42e4 return -EIO; } } ClearPageUptodate(pg); return 0; } } jffs2_write_end { BUG_ON(!PageUptodate(pg)); } Signed-off-by: Anders Grafström Signed-off-by: David Woodhouse --- diff --git a/fs/jffs2/file.c b/fs/jffs2/file.c index 5edc2bf2058..23c94753986 100644 --- a/fs/jffs2/file.c +++ b/fs/jffs2/file.c @@ -99,7 +99,7 @@ static int jffs2_do_readpage_nolock (struct inode *inode, struct page *pg) kunmap(pg); D2(printk(KERN_DEBUG "readpage finished\n")); - return 0; + return ret; } int jffs2_do_readpage_unlock(struct inode *inode, struct page *pg)