lustre: instantiate negative dentry
authoryang sheng <yang.sheng@intel.com>
Sun, 9 Feb 2014 07:51:47 +0000 (02:51 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Feb 2014 20:09:58 +0000 (12:09 -0800)
In the atomic_open callback. We should instantiate
negative dentry. Else will got sanity:183 failed.

Signed-off-by: yang sheng <yang.sheng@intel.com>
Reviewed-on: http://review.whamcloud.com/8110
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3228
Reviewed-by: Peng Tao <bergwolf@gmail.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/llite/namei.c

index 8938d37feca71ac3a808a1eb67ad11dd2d0ea19b..93c3744e09ffd121d34cdc4a86ba02b6e30ed623 100644 (file)
@@ -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)) {
This page took 0.029628 seconds and 5 git commands to generate.