Unionfs: remove unnecessary call to d_iput
authorRachita Kothiyal <rachita@dewey.fsl.cs.sunysb.edu>
Mon, 25 Feb 2008 00:18:32 +0000 (19:18 -0500)
committerRachita Kothiyal <rachita@dewey.fsl.cs.sunysb.edu>
Mon, 25 Feb 2008 00:18:32 +0000 (19:18 -0500)
This old code was to fix a bug which has long since been fixed in our
copyup_permission and unionfs_d_iput.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/unionfs/copyup.c

index 3d211576cf240a15702dd5b820aa9fbe6942bdc6..c4cd254e7c159b0ef08a06bd4204219a1ad723ee 100644 (file)
@@ -813,19 +813,6 @@ begin:
                                                 lower_dentry);
                unlock_dir(lower_parent_dentry);
                if (err) {
-                       struct inode *inode = lower_dentry->d_inode;
-                       /*
-                        * If we get here, it means that we created a new
-                        * dentry+inode, but copying permissions failed.
-                        * Therefore, we should delete this inode and dput
-                        * the dentry so as not to leave cruft behind.
-                        */
-                       if (lower_dentry->d_op && lower_dentry->d_op->d_iput)
-                               lower_dentry->d_op->d_iput(lower_dentry,
-                                                          inode);
-                       else
-                               iput(inode);
-                       lower_dentry->d_inode = NULL;
                        dput(lower_dentry);
                        lower_dentry = ERR_PTR(err);
                        goto out;