From: Lai Siyao <laisi...@whamcloud.com>

This is only part of the original Lustre commit. Splitted to remove
d_add() for create only files, because the dentry is fake,
and will be released right after use.

Lustre-change: http://review.whamcloud.com/6797
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3486
Signed-off-by: Lai Siyao <lai.si...@intel.com>
Reviewed-by: James Simmons <uja.o...@gmail.com>
Reviewed-by: Peng Tao <bergw...@gmail.com>
Reviewed-by: Bobi Jam <bobi...@gmail.com>
Reviewed-by: Fan Yong <fan.y...@intel.com>
Reviewed-by: Alexey Shvetsov <ale...@gentoo.org>
Reviewed-by: Oleg Drokin <oleg.dro...@intel.com>
Signed-off-by: Peng Tao <bergw...@gmail.com>
Signed-off-by: Andreas Dilger <andreas.dil...@intel.com>
---
 drivers/staging/lustre/lustre/llite/namei.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/staging/lustre/lustre/llite/namei.c 
b/drivers/staging/lustre/lustre/llite/namei.c
index 2d13daa..1d03a6f 100644
--- a/drivers/staging/lustre/lustre/llite/namei.c
+++ b/drivers/staging/lustre/lustre/llite/namei.c
@@ -583,12 +583,8 @@ static struct dentry *ll_lookup_nd(struct inode *parent, 
struct dentry *dentry,
               parent->i_generation, parent, flags);
 
        /* Optimize away (CREATE && !OPEN). Let .create handle the race. */
-       if ((flags & LOOKUP_CREATE ) && !(flags & LOOKUP_OPEN)) {
-               ll_dops_init(dentry, 1, 1);
-               __d_lustre_invalidate(dentry);
-               d_add(dentry, NULL);
+       if ((flags & LOOKUP_CREATE) && !(flags & LOOKUP_OPEN))
                return NULL;
-       }
 
        if (flags & (LOOKUP_PARENT|LOOKUP_OPEN|LOOKUP_CREATE))
                itp = NULL;
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to