GIT: unionfs2-2.6.27.y: Unionfs: remove unnecessary call to d_iput

Erez Zadok ezk at fsl.cs.sunysb.edu
Thu Aug 12 23:17:44 EDT 2010


commit dde2ed4e51e97e43533fe4c31c7eee5f8bd9fc18
Author: Erez Zadok <ezk at cs.sunysb.edu>
Date:   Thu Jan 24 21:57:06 2008 -0500

    Unionfs: remove unnecessary call to d_iput
    
    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 at cs.sunysb.edu>

diff --git a/fs/unionfs/copyup.c b/fs/unionfs/copyup.c
index 16b2c7c..8663224 100644
--- a/fs/unionfs/copyup.c
+++ b/fs/unionfs/copyup.c
@@ -807,19 +807,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;


More information about the unionfs-cvs mailing list