Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754340AbaADHHt (ORCPT ); Sat, 4 Jan 2014 02:07:49 -0500 Received: from mail-pd0-f177.google.com ([209.85.192.177]:60983 "EHLO mail-pd0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753180AbaADHHL (ORCPT ); Sat, 4 Jan 2014 02:07:11 -0500 From: Peng Tao To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, Lai Siyao , Lai Siyao , Peng Tao , Andreas Dilger Subject: [PATCH v2 2/8] staging/lustre/llite: don't d_add for create only files Date: Sat, 4 Jan 2014 15:06:14 +0800 Message-Id: <1388819180-31538-3-git-send-email-bergwolf@gmail.com> X-Mailer: git-send-email 1.7.7.6 In-Reply-To: <1388819180-31538-2-git-send-email-bergwolf@gmail.com> References: <1388819180-31538-1-git-send-email-bergwolf@gmail.com> <1388819180-31538-2-git-send-email-bergwolf@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1829 Lines: 46 From: Lai Siyao 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 --- drivers/staging/lustre/lustre/llite/namei.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/namei.c b/drivers/staging/lustre/lustre/llite/namei.c index bc1a644..1d03a6f 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; -- 1.7.7.6 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/