JFFS: rmdir wierdness
David Woodhouse
dwmw2 at infradead.org
Mon Dec 18 08:02:56 EST 2000
dvrabel at arcom.co.uk said:
> # mkdir a
> # ls
> a
> # rmdir a
> # ls
> # mkdir a
> mkdir: a: File exists
>
> Also
>
> # mkdir b
> # touch b/a
> # rm b/a
> # rmdir b
> rmdir: b: Directory not empty
>
> rmdir() thinks `b' still has children (I think).
More problems with the deletion code since I did the use counts.
Hmmm. This was sort of why I didn't want to commit it immediately, till I'd
had time to do some sanity checks on it.
Try this:
Index: intrep.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs/intrep.c,v
retrieving revision 1.84
diff -u -r1.84 intrep.c
--- intrep.c 2000/12/18 13:00:23 1.84
+++ intrep.c 2000/12/18 13:02:30
@@ -1387,7 +1387,7 @@
D3(printk("jffs_find_child()\n"));
for (f = dir->children; f; f = f->sibling_next) {
- if (f->name
+ if (!f->deleted && f->name
&& !strncmp(f->name, name, len)
&& f->name[len] == '\0') {
break;
--
dwmw2
To unsubscribe, send "unsubscribe mtd" to majordomo at infradead.org
More information about the linux-mtd
mailing list