* [PATCH] [JFFS2] Fix return value from jffs2_do_readpage_nolock()
@ 2009-08-03 14:58 Anders Grafström
2009-08-04 11:11 ` Anders Grafström
0 siblings, 1 reply; 2+ messages in thread
From: Anders Grafström @ 2009-08-03 14:58 UTC (permalink / raw)
To: David Woodhouse, Linux-MTD Mailing List
[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 <grfstrm@users.sourceforge.net>
---
This issue has resurfaced on linux-mtd a couple of times now.
So here's the patch for it once more. This time with a proper commit message.
fs/jffs2/file.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/jffs2/file.c b/fs/jffs2/file.c
index 5edc2bf..23c9475 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)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] [JFFS2] Fix return value from jffs2_do_readpage_nolock()
2009-08-03 14:58 [PATCH] [JFFS2] Fix return value from jffs2_do_readpage_nolock() Anders Grafström
@ 2009-08-04 11:11 ` Anders Grafström
0 siblings, 0 replies; 2+ messages in thread
From: Anders Grafström @ 2009-08-04 11:11 UTC (permalink / raw)
To: David Woodhouse, Linux-MTD Mailing List
[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 <grfstrm@users.sourceforge.net>
---
Looks like the previous post got mangled so here's another try.
fs/jffs2/file.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/jffs2/file.c b/fs/jffs2/file.c
index 5edc2bf..23c9475 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)
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-08-04 11:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-03 14:58 [PATCH] [JFFS2] Fix return value from jffs2_do_readpage_nolock() Anders Grafström
2009-08-04 11:11 ` Anders Grafström
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).