mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Erez Zadok <ezk@cs.sunysb.edu>
To: akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	viro@ftp.linux.org.uk, hch@infradead.org,
	Erez Zadok <ezk@cs.sunysb.edu>
Subject: [PATCH 2/4] Unionfs: remove unnecessary call to d_iput
Date: Sat, 26 Jan 2008 00:05:00 -0500	[thread overview]
Message-ID: <12013239031044-git-send-email-ezk@cs.sunysb.edu> (raw)
In-Reply-To: <12013239022656-git-send-email-ezk@cs.sunysb.edu>

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 |   13 -------------
 1 files changed, 0 insertions(+), 13 deletions(-)

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;
-- 
1.5.2.2


  parent reply	other threads:[~2008-01-26  5:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-26  5:04 [GIT PULL -mm] 0/4 Unionfs updates/fixes/cleanups Erez Zadok
2008-01-26  5:04 ` [PATCH 1/4] Unionfs: use first writable branch (fix/cleanup) Erez Zadok
2008-01-26  5:05 ` Erez Zadok [this message]
2008-01-26  5:05 ` [PATCH 3/4] Unionfs: d_parent related locking fixes Erez Zadok
2008-01-26  5:05 ` [PATCH 4/4] Unionfs: lock_rename " Erez Zadok

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=12013239031044-git-send-email-ezk@cs.sunysb.edu \
    --to=ezk@cs.sunysb.edu \
    --cc=akpm@linux-foundation.org \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@ftp.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome