diff for duplicates of <1444308880.43040.1.camel@primarydata.com> diff --git a/a/1.txt b/N1/1.txt index 3811774..34f2d5e 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -21,3 +21,62 @@ Cheers Trond 8<----------------------------------------------------------------- +>From eb61ece5739bb2f3b6d03dd8ca8e335bf0d12687 Mon Sep 17 00:00:00 2001 +From: Trond Myklebust <trond.myklebust@primarydata.com> +Date: Thu, 8 Oct 2015 08:44:00 -0400 +Subject: [PATCH] namei: results of d_is_negative() should be checked after + dentry revalidation + +Leandro Awa writes: +After switching to version 4.1.6, our parallelized and distributed workflows now fail consistently with errors of the form: + +T34: ./regex.c:39:22: error: config.h: No such file or directory + +>From our 'git bisect' testing, the following commit appears to be +the possible cause of the behavior we've been seeing: commit 766c4cbfacd8 + +The issue is that revalidation may cause the dentry to be dropped in NFS +if, say, the client notes that the directory timestamps have changed. + +Reported-by: Leandro Awa <lawa@nvidia.com> +Link: https://bugzilla.kernel.org/show_bug.cgi?id=104911 +Fixes: 766c4cbfacd8 ("namei: d_is_negative() should be checked...") +Cc: stable@vger.kernel.org # v4.1+ +Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> +--- + fs/namei.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/fs/namei.c b/fs/namei.c +index 726d211db484..33e9495a3129 100644 +--- a/fs/namei.c ++++ b/fs/namei.c +@@ -1558,8 +1558,6 @@ static int lookup_fast(struct nameidata *nd, + negative = d_is_negative(dentry); + if (read_seqcount_retry(&dentry->d_seq, seq)) + return -ECHILD; +- if (negative) +- return -ENOENT; + + /* + * This sequence count validates that the parent had no +@@ -1580,6 +1578,12 @@ static int lookup_fast(struct nameidata *nd, + goto unlazy; + } + } ++ /* ++ * Note: do negative dentry check after revalidation in ++ * case that drops it. ++ */ ++ if (negative) ++ return -ENOENT; + path->mnt = mnt; + path->dentry = dentry; + if (likely(__follow_mount_rcu(nd, path, inode, seqp))) +-- +2.4.3 + +-- +Trond Myklebust +Linux NFS client maintainer, PrimaryData +trond.myklebust@primarydata.com diff --git a/a/content_digest b/N1/content_digest index 8a3757e..7b75c23 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -30,6 +30,65 @@ "Cheers\n" " Trond\n" "\n" - 8<----------------------------------------------------------------- + "8<-----------------------------------------------------------------\n" + ">From eb61ece5739bb2f3b6d03dd8ca8e335bf0d12687 Mon Sep 17 00:00:00 2001\n" + "From: Trond Myklebust <trond.myklebust@primarydata.com>\n" + "Date: Thu, 8 Oct 2015 08:44:00 -0400\n" + "Subject: [PATCH] namei: results of d_is_negative() should be checked after\n" + " dentry revalidation\n" + "\n" + "Leandro Awa writes:\n" + "After switching to version 4.1.6, our parallelized and distributed workflows now fail consistently with errors of the form:\n" + "\n" + "T34: ./regex.c:39:22: error: config.h: No such file or directory\n" + "\n" + ">From our 'git bisect' testing, the following commit appears to be\n" + "the possible cause of the behavior we've been seeing: commit 766c4cbfacd8\n" + "\n" + "The issue is that revalidation may cause the dentry to be dropped in NFS\n" + "if, say, the client notes that the directory timestamps have changed.\n" + "\n" + "Reported-by: Leandro Awa <lawa@nvidia.com>\n" + "Link: https://bugzilla.kernel.org/show_bug.cgi?id=104911\n" + "Fixes: 766c4cbfacd8 (\"namei: d_is_negative() should be checked...\")\n" + "Cc: stable@vger.kernel.org # v4.1+\n" + "Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>\n" + "---\n" + " fs/namei.c | 8 ++++++--\n" + " 1 file changed, 6 insertions(+), 2 deletions(-)\n" + "\n" + "diff --git a/fs/namei.c b/fs/namei.c\n" + "index 726d211db484..33e9495a3129 100644\n" + "--- a/fs/namei.c\n" + "+++ b/fs/namei.c\n" + "@@ -1558,8 +1558,6 @@ static int lookup_fast(struct nameidata *nd,\n" + " \t\tnegative = d_is_negative(dentry);\n" + " \t\tif (read_seqcount_retry(&dentry->d_seq, seq))\n" + " \t\t\treturn -ECHILD;\n" + "-\t\tif (negative)\n" + "-\t\t\treturn -ENOENT;\n" + " \n" + " \t\t/*\n" + " \t\t * This sequence count validates that the parent had no\n" + "@@ -1580,6 +1578,12 @@ static int lookup_fast(struct nameidata *nd,\n" + " \t\t\t\tgoto unlazy;\n" + " \t\t\t}\n" + " \t\t}\n" + "+\t\t/*\n" + "+\t\t * Note: do negative dentry check after revalidation in\n" + "+\t\t * case that drops it.\n" + "+\t\t */\n" + "+\t\tif (negative)\n" + "+\t\t\treturn -ENOENT;\n" + " \t\tpath->mnt = mnt;\n" + " \t\tpath->dentry = dentry;\n" + " \t\tif (likely(__follow_mount_rcu(nd, path, inode, seqp)))\n" + "-- \n" + "2.4.3\n" + "\n" + "-- \n" + "Trond Myklebust\n" + "Linux NFS client maintainer, PrimaryData\n" + trond.myklebust@primarydata.com -6c9bf1ca4e4b11b41a161e17f55a3ca5275ba05a471045c7f9ad1c9f847f1982 +1c970b37d86bb3cec51a9d4941acffda7f86f2a2bb590eb96a263aa575dcd26b
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.