From: yang sheng Date: Sun, 9 Feb 2014 07:51:47 +0000 (-0500) Subject: lustre: instantiate negative dentry X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=08a78a27e1693ca1cf5a11e41d7a374d7b14a2fd;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git lustre: instantiate negative dentry In the atomic_open callback. We should instantiate negative dentry. Else will got sanity:183 failed. Signed-off-by: yang sheng Reviewed-on: http://review.whamcloud.com/8110 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3228 Reviewed-by: Peng Tao Reviewed-by: Lai Siyao Reviewed-by: James Simmons Reviewed-by: Bob Glossman Reviewed-by: Oleg Drokin Signed-off-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lustre/llite/namei.c b/drivers/staging/lustre/lustre/llite/namei.c index 8938d37feca7..93c3744e09ff 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)) {