提交 08a78a27 编写于 作者: Y yang sheng 提交者: Greg Kroah-Hartman

lustre: instantiate negative dentry

In the atomic_open callback. We should instantiate
negative dentry. Else will got sanity:183 failed.
Signed-off-by: Nyang sheng <yang.sheng@intel.com>
Reviewed-on: http://review.whamcloud.com/8110
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3228Reviewed-by: NPeng Tao <bergwolf@gmail.com>
Reviewed-by: NLai Siyao <lai.siyao@intel.com>
Reviewed-by: NJames Simmons <uja.ornl@gmail.com>
Reviewed-by: NBob Glossman <bob.glossman@intel.com>
Reviewed-by: NOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: NOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 7486bc06
......@@ -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)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册