From: Sage Weil <sage@newdream.net>
To: hch@infradead.org, viro@ZenIV.linux.org.uk
Cc: linux-fsdevel@vger.kernel.org, Sage Weil <sage@newdream.net>,
Bob Copeland <me@bobcopeland.com>,
linux-karma-devel@lists.sourceforge.net
Subject: [PATCH 11/26] omfs: remove unnecessary dentry_unhash on rmdir, dir rneame
Date: Fri, 27 May 2011 13:42:04 -0700 [thread overview]
Message-ID: <1306528939-30636-12-git-send-email-sage@newdream.net> (raw)
In-Reply-To: <1306528939-30636-1-git-send-email-sage@newdream.net>
omfs does not have problems with references to unlinked directories.
CC: Bob Copeland <me@bobcopeland.com>
CC: linux-karma-devel@lists.sourceforge.net
Signed-off-by: Sage Weil <sage@newdream.net>
---
fs/omfs/dir.c | 11 +++--------
1 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/fs/omfs/dir.c b/fs/omfs/dir.c
index c368360..3b8d397 100644
--- a/fs/omfs/dir.c
+++ b/fs/omfs/dir.c
@@ -241,11 +241,9 @@ static int omfs_remove(struct inode *dir, struct dentry *dentry)
int ret;
- if (S_ISDIR(inode->i_mode)) {
- dentry_unhash(dentry);
- if (!omfs_dir_is_empty(inode))
- return -ENOTEMPTY;
- }
+ if (S_ISDIR(inode->i_mode) &&
+ !omfs_dir_is_empty(inode))
+ return -ENOTEMPTY;
ret = omfs_delete_entry(dentry);
if (ret)
@@ -382,9 +380,6 @@ static int omfs_rename(struct inode *old_dir, struct dentry *old_dentry,
int err;
if (new_inode) {
- if (S_ISDIR(new_inode->i_mode))
- dentry_unhash(new_dentry);
-
/* overwriting existing file/dir */
err = omfs_remove(new_dir, new_dentry);
if (err)
--
1.7.0
next prev parent reply other threads:[~2011-05-27 20:41 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-27 20:41 [PATCH 00/26] Some final dentry_unhash cleanup Sage Weil
2011-05-27 20:41 ` [PATCH 01/26] bfs: remove unnecessary dentry_unhash on dir rename Sage Weil
2011-05-27 20:41 ` [PATCH 02/26] sysv: remove unnecessary dentry_unhash from rmdir, " Sage Weil
2011-05-27 20:41 ` [PATCH 03/26] jffs2: " Sage Weil
2011-05-27 20:41 ` [PATCH 04/26] jfs: " Sage Weil
2011-05-27 20:41 ` [PATCH 05/26] logfs: " Sage Weil
[not found] ` <1306528939-30636-1-git-send-email-sage-BnTBU8nroG7k1uMJSBkQmQ@public.gmane.org>
2011-05-27 20:41 ` [PATCH 06/26] nilfs2: " Sage Weil
2011-05-27 20:42 ` [PATCH 07/26] ubifs: " Sage Weil
2011-05-27 20:42 ` [PATCH 08/26] ufs: " Sage Weil
2011-05-27 20:42 ` [PATCH 09/26] reiserfs: " Sage Weil
2011-05-27 20:42 ` [PATCH 10/26] udf: " Sage Weil
2011-05-30 9:43 ` Jan Kara
2011-05-27 20:42 ` Sage Weil [this message]
2011-06-05 0:42 ` [PATCH 11/26] omfs: remove unnecessary dentry_unhash on rmdir, dir rneame Bob Copeland
2011-05-27 20:42 ` [PATCH 12/26] hfs: remove unnecessary dentry_unhash on rmdir, dir rename Sage Weil
2011-05-27 20:42 ` [PATCH 13/26] hfsplus: " Sage Weil
2011-05-27 20:42 ` [PATCH 14/26] hostfs: " Sage Weil
2011-05-27 20:42 ` [PATCH 15/26] ecryptfs: " Sage Weil
2011-05-27 20:42 ` [PATCH 16/26] ncpfs: document dentry_unhash usage Sage Weil
2011-05-27 20:42 ` [PATCH 17/26] ncpfs: fix rename over directory with dangling references Sage Weil
2011-05-27 20:42 ` [PATCH 18/26] 9p: remove unnecessary dentry_unhash on rmdir, dir rename Sage Weil
2011-05-27 20:42 ` [PATCH 19/26] affs: " Sage Weil
2011-05-27 20:42 ` [PATCH 20/26] afs: " Sage Weil
2011-05-27 20:42 ` [PATCH 21/26] coda: " Sage Weil
2011-05-27 20:42 ` [PATCH 22/26] fuse: " Sage Weil
2011-05-27 20:42 ` [PATCH 23/26] minix: " Sage Weil
2011-05-27 20:42 ` [PATCH 24/26] hpfs: " Sage Weil
2011-05-27 20:42 ` [PATCH 25/26] fat: " Sage Weil
2011-05-28 6:37 ` OGAWA Hirofumi
2011-05-27 20:42 ` [PATCH 26/26] configfs: " Sage Weil
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=1306528939-30636-12-git-send-email-sage@newdream.net \
--to=sage@newdream.net \
--cc=hch@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-karma-devel@lists.sourceforge.net \
--cc=me@bobcopeland.com \
--cc=viro@ZenIV.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;
as well as URLs for NNTP newsgroup(s).