Skip to content

Commit

Permalink
ceph: remove unnecessary dentry_unhash calls
Browse files Browse the repository at this point in the history
Ceph does not need these, and they screw up our use of the dcache as a
consistent cache.

Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Sage Weil authored and Al Viro committed May 26, 2011
1 parent 51892bb commit 051e8f0
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions fs/ceph/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 ||
Expand Down

0 comments on commit 051e8f0

Please sign in to comment.