From: Joseph Qi <joseph.qi@huawei.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH] ocfs2: fix the wrong directory passed to ocfs2_lookup_ino_from_name() when link file
Date: Tue, 6 Jan 2015 09:07:36 +0800 [thread overview]
Message-ID: <54AB3558.3040508@huawei.com> (raw)
In-Reply-To: <20150105141632.a14da73fc82f5c2439e51001@linux-foundation.org>
On 2015/1/6 6:16, Andrew Morton wrote:
> On Mon, 22 Dec 2014 09:52:14 +0100 Aron Szabo <aron@ubit.hu> wrote:
>
>> 12/19/2014 11:15 PM keltez__ssel, Andrew Morton __rta:
>>> On Fri, 19 Dec 2014 18:07:45 +0800 Xue jiufei <xuejiufei@huawei.com> wrote:
>>>
>>>> In function ocfs2_link(), parent directory inode passed to function
>>>> ocfs2_lookup_ino_from_name() is wrong. Parameter dir is the parent
>>>> of new_dentry not old_dentry. We should get old_dir from old_dentry
>>>> and lookup old_dentry in old_dir in case another node remove the old dentry.
>>> What are the user-visible effects of this change?
>>
>> Hi Andew!
>>
>> Hard linking works again, when paths are relative with at least one
>> subdirectory. This is how the problem was reproducable:
>>
>> # mkdir a
>> # mkdir b
>> # touch a/test
>> # ln a/test b/test
>> ln: failed to create hard link `b/test' => `a/test': No such file or
>> directory
>>
>> However when creating links in the same dir, it worked well.
>>
>> Now the link gets created.
>>
>> Thanks for the quick fix Xue!
>
> (top-posting untangled)
>
> When you say "works again", you mean that we broke it? This patch
> fixes a regression? If so, do we know what caused that regression? Or
> at least when it occurred?
Yes? it fixes commit 0e048316ff57 (ocfs2: check existence of old dentry
in ocfs2_link()).
>
>
>
> _______________________________________________
> Ocfs2-devel mailing list
> Ocfs2-devel at oss.oracle.com
> https://oss.oracle.com/mailman/listinfo/ocfs2-devel
>
>
prev parent reply other threads:[~2015-01-06 1:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-19 10:07 [Ocfs2-devel] [PATCH] ocfs2: fix the wrong directory passed to ocfs2_lookup_ino_from_name() when link file Xue jiufei
2014-12-19 22:15 ` Andrew Morton
2014-12-22 8:52 ` Aron Szabo
2015-01-05 22:16 ` Andrew Morton
2015-01-06 1:07 ` Joseph Qi [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=54AB3558.3040508@huawei.com \
--to=joseph.qi@huawei.com \
--cc=ocfs2-devel@oss.oracle.com \
/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