Skip to content

Commit

Permalink
lustre: instantiate negative dentry
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
yang sheng authored and Greg Kroah-Hartman committed Feb 11, 2014
1 parent 7486bc0 commit 08a78a2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/staging/lustre/lustre/llite/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 08a78a2

Please sign in to comment.