From: Eric Sandeen <sandeen@redhat.com>
To: Alex Tomas <alex@clusterfs.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
ext4 development <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH] [RFC] remove ext3 inode from orphan list when link and unlink race
Date: Fri, 12 Jan 2007 15:14:36 -0600 [thread overview]
Message-ID: <45A7FA3C.8030209@redhat.com> (raw)
In-Reply-To: <m34pqw0xii.fsf@bzzz.home.net>
Alex Tomas wrote:
> interesting ..
>
> I thought VFS doesn't allow concurrent operations.
> if unlink goes first, then link should wait on the
> parent's i_mutex and then found no source name.
>
> thanks, Alex
Well... I was wondering that myself, whether this race should even
happen. But the bottom of do_unlinkat looks like:
mutex_unlock(&nd.dentry->d_inode->i_mutex);
if (inode)
iput(inode); /* truncate the inode here */
exit1:
path_release(&nd);
exit:
putname(name);
return error;
so I think it's possible that link can sneak in there & find it after
the mutex is dropped...? Is this ok? :) It's certainly -happening-
anyway....
-Eric
next prev parent reply other threads:[~2007-01-12 21:14 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-12 20:45 [PATCH] [RFC] remove ext3 inode from orphan list when link and unlink race Eric Sandeen
2007-01-12 21:02 ` Alex Tomas
2007-01-12 21:14 ` Eric Sandeen [this message]
2007-01-12 21:25 ` Alex Tomas
2007-01-12 21:48 ` Eric Sandeen
2007-01-12 21:55 ` Alex Tomas
2007-01-12 22:01 ` Eric Sandeen
2007-01-12 22:07 ` Alex Tomas
2007-01-12 22:35 ` Eric Sandeen
2007-01-12 21:17 ` Alex Tomas
2007-01-12 21:24 ` Dave Kleikamp
2007-01-14 11:58 ` Dmitriy Monakhov
2007-01-14 15:42 ` Eric Sandeen
2007-01-17 22:43 ` Andreas Dilger
2007-01-17 22:47 ` Eric Sandeen
2007-01-18 10:43 ` Andreas Dilger
2007-01-18 15:28 ` Eric Sandeen
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=45A7FA3C.8030209@redhat.com \
--to=sandeen@redhat.com \
--cc=alex@clusterfs.com \
--cc=linux-ext4@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.