From: Lai Siyao Date: Wed, 22 Jan 2014 13:36:13 +0000 (+0800) Subject: staging/lustre/llite: don't d_add for create only files X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4f2fb455a1dcdf3cacf30382460c3706cf7e66d1;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git staging/lustre/llite: don't d_add for create only files 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 Reviewed-by: James Simmons Reviewed-by: Peng Tao Reviewed-by: Bobi Jam Reviewed-by: Fan Yong Reviewed-by: Alexey Shvetsov Reviewed-by: Oleg Drokin Signed-off-by: Peng Tao Signed-off-by: Andreas Dilger 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 bc1a644aa502..1d03a6f8e4ad 100644 --- a/drivers/staging/lustre/lustre/llite/namei.c +++ b/drivers/staging/lustre/lustre/llite/namei.c @@ -583,11 +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)) { - __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;