mtd/fs/jffs2 readinode.c,1.110,1.111
David Woodhouse
dwmw2 at infradead.org
Fri Oct 31 09:54:04 EST 2003
Update of /home/cvs/mtd/fs/jffs2
In directory phoenix.infradead.org:/tmp/cvs-serv18680
Modified Files:
readinode.c
Log Message:
Revert race workaround
Index: readinode.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/readinode.c,v
retrieving revision 1.110
retrieving revision 1.111
diff -u -r1.110 -r1.111
--- readinode.c 30 Oct 2003 15:21:58 -0000 1.110
+++ readinode.c 31 Oct 2003 14:54:01 -0000 1.111
@@ -408,8 +408,6 @@
int jffs2_do_read_inode(struct jffs2_sb_info *c, struct jffs2_inode_info *f,
uint32_t ino, struct jffs2_raw_inode *latest_node)
{
- int ret = 0;
-
D2(printk(KERN_DEBUG "jffs2_do_read_inode(): getting inocache\n"));
retry_inocache:
@@ -436,23 +434,14 @@
sleep_on_spinunlock(&c->inocache_wq, &c->inocache_lock);
goto retry_inocache;
- case INO_STATE_PRESENT:
- if (!f->inocache->nlink) {
- D1(printk(KERN_WARNING "Kernel VFS BUG: read_inode() called for inode #%u not yet cleared\n",
- ino));
- f->inocache = NULL;
- ret = -EAGAIN;
- break;
- }
-
case INO_STATE_READING:
+ case INO_STATE_PRESENT:
/* Eep. This should never happen. It can
happen if Linux calls read_inode() again
before clear_inode() has finished though. */
printk(KERN_WARNING "Eep. Trying to read_inode #%u when it's already in state %d!\n", ino, f->inocache->state);
/* Fail. That's probably better than allowing it to succeed */
f->inocache = NULL;
- ret = -EIO;
break;
default:
@@ -476,11 +465,8 @@
jffs2_add_ino_cache(c, f->inocache);
}
if (!f->inocache) {
- if (!ret) {
- printk(KERN_WARNING "jffs2_do_read_inode() on nonexistent ino %u\n", ino);
- ret = -ENOENT;
- }
- return ret;
+ printk(KERN_WARNING "jffs2_do_read_inode() on nonexistent ino %u\n", ino);
+ return -ENOENT;
}
return jffs2_do_read_inode_internal(c, f, latest_node);
More information about the linux-mtd-cvs
mailing list