[ECOS] Inode reference counting wrong for jffs2
Thomas Koeller
thomas.koeller@baslerweb.com
Fri Jan 9 13:23:00 GMT 2004
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-orig/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_REMOVE 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
==============================
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss
More information about the Ecos-discuss
mailing list