public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: David Vrabel <dvrabel@arcom.co.uk>
Cc: mtd@infradead.org, jffs-dev@axis.com
Subject: Re: JFFS: rmdir wierdness
Date: Mon, 18 Dec 2000 13:02:56 +0000	[thread overview]
Message-ID: <23862.977144576@redhat.com> (raw)
In-Reply-To: <3A3E07C4.22A3F127@arcom.co.uk>


dvrabel@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@infradead.org

  reply	other threads:[~2000-12-18 13:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-18 12:49 JFFS: rmdir wierdness David Vrabel
2000-12-18 13:02 ` David Woodhouse [this message]
2000-12-18 13:04 ` David Vrabel
2000-12-18 14:18 ` David Vrabel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=23862.977144576@redhat.com \
    --to=dwmw2@infradead.org \
    --cc=dvrabel@arcom.co.uk \
    --cc=jffs-dev@axis.com \
    --cc=mtd@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox