[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1391932309-6009-4-git-send-email-green@linuxhacker.ru>
Date: Sun, 9 Feb 2014 02:51:47 -0500
From: Oleg Drokin <green@...uxhacker.ru>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org, devel@...verdev.osuosl.org
Cc: yang sheng <yang.sheng@...el.com>,
Oleg Drokin <oleg.drokin@...el.com>
Subject: [PATCH 3/5] lustre: instantiate negative dentry
From: yang sheng <yang.sheng@...el.com>
In the atomic_open callback. We should instantiate
negative dentry. Else will got sanity:183 failed.
Signed-off-by: yang sheng <yang.sheng@...el.com>
Reviewed-on: http://review.whamcloud.com/8110
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3228
Reviewed-by: Peng Tao <bergwolf@...il.com>
Reviewed-by: Lai Siyao <lai.siyao@...el.com>
Reviewed-by: James Simmons <uja.ornl@...il.com>
Reviewed-by: Bob Glossman <bob.glossman@...el.com>
Reviewed-by: Oleg Drokin <oleg.drokin@...el.com>
Signed-off-by: Oleg Drokin <oleg.drokin@...el.com>
---
drivers/staging/lustre/lustre/llite/namei.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/staging/lustre/lustre/llite/namei.c b/drivers/staging/lustre/lustre/llite/namei.c
index 8938d37..93c3744 100644
--- a/drivers/staging/lustre/lustre/llite/namei.c
+++ b/drivers/staging/lustre/lustre/llite/namei.c
@@ -468,6 +468,12 @@ int ll_lookup_it_finish(struct ptlrpc_request *request,
if (IS_ERR(alias))
return PTR_ERR(alias);
*de = alias;
+ } else if (!it_disposition(it, DISP_LOOKUP_NEG) &&
+ !it_disposition(it, DISP_OPEN_CREATE)) {
+ /* With DISP_OPEN_CREATE dentry will
+ instantiated in ll_create_it. */
+ LASSERT((*de)->d_inode == NULL);
+ d_instantiate(*de, inode);
}
if (!it_disposition(it, DISP_LOOKUP_NEG)) {
--
1.8.5.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists