This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Fix hard link creation for jffs2
- From: Thomas Koeller <thomas dot koeller at baslerweb dot com>
- To: ecos-patches at sources dot redhat dot com
- Date: Mon, 22 Sep 2003 19:50:39 +0200
- Subject: Fix hard link creation for jffs2
- Organization: Basler AG
JFFS2 really seems to be a bit messy. This time I found that hard links
cannot be created because the first two arguments in the call to jffs2_link()
are swapped. This would result in the creation of dentry nodes that had
their parent and target inode numbers swapped.
diff -ru packages-orig/fs/jffs2/current/ChangeLog packages/fs/jffs2/current/ChangeLog
--- packages-orig/fs/jffs2/current/ChangeLog 2003-09-22 19:37:48.000000000 +0200
+++ packages/fs/jffs2/current/ChangeLog 2003-09-22 19:42:42.000000000 +0200
@@ -1,3 +1,7 @@
+2003-09-22 Thomas Koeller <thomas.koeller@baslerweb.com>
+
+ * src/fs-ecos.c: Fixed broken hard link creation.
+
2003-09-19 Thomas Koeller <thomas.koeller@baslerweb.com>
* src/fs-ecos.c: Another inode number fix.
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 2003-09-22 19:37:48.000000000 +0200
+++ packages/fs/jffs2/current/src/fs-ecos.c 2003-09-22 19:40:53.000000000 +0200
@@ -1022,7 +1022,7 @@
this.len = hashname - (const char *) this.name;
this.hash = end_name_hash(hash);
- err = jffs2_link(ds2.dir, ds1.node, &this);
+ err = jffs2_link(ds1.node, ds2.dir, &this);
if (err == 0)
ds1.node->i_ctime =
--------------------------------------------------
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
==============================