提交 4f2fb455 编写于 作者: L Lai Siyao 提交者: Greg Kroah-Hartman

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-3486Signed-off-by: NLai Siyao <lai.siyao@intel.com>
Reviewed-by: NJames Simmons <uja.ornl@gmail.com>
Reviewed-by: NPeng Tao <bergwolf@gmail.com>
Reviewed-by: NBobi Jam <bobijam@gmail.com>
Reviewed-by: NFan Yong <fan.yong@intel.com>
Reviewed-by: NAlexey Shvetsov <alexxy@gentoo.org>
Reviewed-by: NOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: NPeng Tao <bergwolf@gmail.com>
Signed-off-by: NAndreas Dilger <andreas.dilger@intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 3ea8f3bc
...@@ -583,11 +583,8 @@ static struct dentry *ll_lookup_nd(struct inode *parent, struct dentry *dentry, ...@@ -583,11 +583,8 @@ static struct dentry *ll_lookup_nd(struct inode *parent, struct dentry *dentry,
parent->i_generation, parent, flags); parent->i_generation, parent, flags);
/* Optimize away (CREATE && !OPEN). Let .create handle the race. */ /* Optimize away (CREATE && !OPEN). Let .create handle the race. */
if ((flags & LOOKUP_CREATE ) && !(flags & LOOKUP_OPEN)) { if ((flags & LOOKUP_CREATE) && !(flags & LOOKUP_OPEN))
__d_lustre_invalidate(dentry);
d_add(dentry, NULL);
return NULL; return NULL;
}
if (flags & (LOOKUP_PARENT|LOOKUP_OPEN|LOOKUP_CREATE)) if (flags & (LOOKUP_PARENT|LOOKUP_OPEN|LOOKUP_CREATE))
itp = NULL; itp = NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册