staging/lustre/llite: don't d_add for create only files
authorLai Siyao <laisiyao@whamcloud.com>
Wed, 22 Jan 2014 13:36:13 +0000 (21:36 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Feb 2014 17:44:16 +0000 (09:44 -0800)
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.siyao@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Peng Tao <bergwolf@gmail.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Alexey Shvetsov <alexxy@gentoo.org>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/llite/namei.c

index bc1a644aa502d0d2bb87eefc9659ad8d13d44c9a..1d03a6f8e4ad25559a31a8f426748907ce63ea89 100644 (file)
@@ -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;
This page took 0.026378 seconds and 5 git commands to generate.