Andrew Morton
2014-Dec-19 22:15 UTC
[Ocfs2-devel] [PATCH] ocfs2: fix the wrong directory passed to ocfs2_lookup_ino_from_name() when link file
On Fri, 19 Dec 2014 18:07:45 +0800 Xue jiufei <xuejiufei at 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?
Aron Szabo
2014-Dec-22 08:52 UTC
[Ocfs2-devel] [PATCH] ocfs2: fix the wrong directory passed to ocfs2_lookup_ino_from_name() when link file
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! Yours, Aron 12/19/2014 11:15 PM keltez?ssel, Andrew Morton ?rta:> On Fri, 19 Dec 2014 18:07:45 +0800 Xue jiufei <xuejiufei at 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?-------------- next part -------------- An HTML attachment was scrubbed... URL: http://oss.oracle.com/pipermail/ocfs2-devel/attachments/20141222/0cf52b56/attachment.html
Andrew Morton
2015-Jan-05 22:16 UTC
[Ocfs2-devel] [PATCH] ocfs2: fix the wrong directory passed to ocfs2_lookup_ino_from_name() when link file
On Mon, 22 Dec 2014 09:52:14 +0100 Aron Szabo <aron at 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 at 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?