Unionfs: remove unnecessary parent lock in create
authorErez Zadok <ezk@cs.sunysb.edu>
Thu, 10 Jan 2008 12:01:48 +0000 (07:01 -0500)
committerRachita Kothiyal <rachita@dewey.fsl.cs.sunysb.edu>
Thu, 1 May 2008 23:03:30 +0000 (19:03 -0400)
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/unionfs/inode.c

index fb6b65a69f0bd0898b533d91e8cbe037f6474d8a..a83781778485520e89cba0be2c504d75f06a0380 100644 (file)
@@ -31,13 +31,6 @@ static int unionfs_create(struct inode *parent, struct dentry *dentry,
        unionfs_read_lock(dentry->d_sb);
        unionfs_lock_dentry(dentry);
 
-       unionfs_lock_dentry(dentry->d_parent);
-       valid = __unionfs_d_revalidate_chain(dentry->d_parent, nd, false);
-       unionfs_unlock_dentry(dentry->d_parent);
-       if (unlikely(!valid)) {
-               err = -ESTALE;  /* same as what real_lookup does */
-               goto out;
-       }
        valid = __unionfs_d_revalidate_chain(dentry, nd, false);
        /*
         * It's only a bug if this dentry was not negative and couldn't be