public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@clusterfs.com>
To: Paul Allen <allenp@nwlink.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: Ext2 zeros inode in directory entry when deleting files.
Date: Mon, 18 Mar 2002 18:34:53 -0700	[thread overview]
Message-ID: <20020319013453.GC470@turbolinux.com> (raw)
In-Reply-To: <20020317131702.A16140@mark.mielke.cc> <Pine.LNX.4.44.0203171516540.21552-100000@waste.org> <20020317185356.C16140@mark.mielke.cc> <3C968B38.4070405@nwlink.com>

On Mar 18, 2002  16:50 -0800, Paul Allen wrote:
> Perhaps you can imagine the trepidation with which I put
> forth the following fact:

Yes, it is always tough when you dip your toes into new waters.
In this case I think you may have something.  There is always
the chance that Al will still pipe in with "not doing that can
be exploited as a race condition by doing X, Y, and Z".

> With 2.4.6, the ext2_delete_entry() function moved from
> fs/ext2/namei.c to fs/ext2/dir.c and its behavior changed.
> Now, the inode number is always zeroed.

You could always just put an "else" in front of the zeroing, so
it looks like:

	if (pde)
                pde->rec_len = cpu_to_le16(to-from);
	else
		dir->inode = 0;

Let us know how it turns out (I think it will be OK).

Cheers, Andreas
--
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert


      reply	other threads:[~2002-03-19  5:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-16  8:24 Ext2 zeros inode in directory entry when deleting files Paul Allen
2002-03-16  9:02 ` Alexander Viro
2002-03-17  7:25 ` tytso
2002-03-17 17:21   ` Oliver Xymoron
2002-03-17 18:17     ` Mark Mielke
2002-03-17 21:20       ` Oliver Xymoron
2002-03-17 23:53         ` Mark Mielke
2002-03-19  0:50           ` Paul Allen
2002-03-19  1:34             ` Andreas Dilger [this message]

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=20020319013453.GC470@turbolinux.com \
    --to=adilger@clusterfs.com \
    --cc=allenp@nwlink.com \
    --cc=linux-kernel@vger.kernel.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