From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sage Weil Subject: [PATCH 08/18] ceph: remove unnecessary dentry_unhash calls Date: Mon, 9 May 2011 21:43:26 -0700 Message-ID: <1305002616-16782-9-git-send-email-sage@newdream.net> References: <1305002616-16782-1-git-send-email-sage@newdream.net> Cc: Sage Weil To: viro@ZenIV.linux.org.uk, hch@lst.de, linux-fsdevel@vger.kernel.org Return-path: Received: from cobra.newdream.net ([66.33.216.30]:57291 "EHLO cobra.newdream.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752929Ab1EJFKp (ORCPT ); Tue, 10 May 2011 01:10:45 -0400 In-Reply-To: <1305002616-16782-1-git-send-email-sage@newdream.net> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Ceph does not need these, and they screw up our use of the dcache as a consistent cache. Signed-off-by: Sage Weil --- fs/ceph/dir.c | 6 ------ 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index 377b964..1a867a3 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c @@ -827,9 +827,6 @@ static int ceph_unlink(struct inode *dir, struct dentry *dentry) int err = -EROFS; int op; - if ((dentry->d_inode->i_mode & S_IFMT) == S_IFDIR) - dentry_unhash(dentry); - if (ceph_snap(dir) == CEPH_SNAPDIR) { /* rmdir .snap/foo is RMSNAP */ dout("rmsnap dir %p '%.*s' dn %p\n", dir, dentry->d_name.len, @@ -869,9 +866,6 @@ static int ceph_rename(struct inode *old_dir, struct dentry *old_dentry, struct ceph_mds_request *req; int err; - if (new_dentry->d_inode && S_ISDIR(new_dentry->d_inode->i_mode)) - dentry_unhash(new_dentry); - if (ceph_snap(old_dir) != ceph_snap(new_dir)) return -EXDEV; if (ceph_snap(old_dir) != CEPH_NOSNAP || -- 1.7.1