This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Inode reference counting wrong for jffs2
- From: Thomas Koeller <thomas dot koeller at baslerweb dot com>
- To: ecos-patches at sources dot redhat dot com
- Date: Fri, 9 Jan 2004 14:54:50 +0100
- Subject: Inode reference counting wrong for jffs2
- Organization: Basler AG
I found a bug fs-ecos.c. When creating a link, the
code performed a check to ensure that the destination
did not already exist. If no destination inode
existed (the normal case), the code would nonetheless
attempt to decrement its reference count. This would
result in the reference count of the containing
directory's inode instead.
The patch below fixes this.
diff -ru packages-orig/fs/jffs2/current/ChangeLog packages/fs/jffs2/current/ChangeLog
--- packages-oE that had been
diff -ru packages-orig/fs/jffs2/current/src/fs-ecos.c packages/fs/jffs2/current/src/fs-ecos.c
--- packages-orig/fs/jffs2/current/src/fs-ecos.c 2004-01-05 15:14:04.000000000 +0100
+++ packages/fs/jffs2/current/src/fs-ecos.c 2004-01-09 13:40:17.000000000 +0100
@@ -991,7 +991,6 @@
// Allow through links to non-existing terminal objects
if (ds2.last && err == ENOENT) {
- jffs2_iput(ds2.node);
ds2.node = NULL;
err = ENOERR;
}
--
--------------------------------------------------
Thomas Koeller, Software Development
Basler Vision Technologies
An der Strusbek 60-62
22926 Ahrensburg
Germany
Tel +49 (4102) 463-162
Fax +49 (4102) 463-239
mailto:thomas.koeller@baslerweb.com
http://www.baslerweb.com
==============================
rig/fs/jffs2/current/ChangeLog 2004-01-07 11:59:51.000000000 +0100
+++ packages/fs/jffs2/current/ChangeLog 2004-01-09 13:49:40.000000000 +0100
@@ -1,3 +1,7 @@
+2004-01-09 Thomas Koeller <thomas.koeller@baslerweb.com>
+
+ * src/fs-ecos.c: Fixed inode reference counting in jffs2_ops_link().
+
2004-01-05 Thomas Koeller <thomas.koeller@baslerweb.com>
* cdl/jffs2.cdl: Re-added CYGPKG_FS_JFFS2_CFLAGS_REMOV