Skip to content

Commit

Permalink
Revert "ceph: keep reference to parent inode on ceph_dentry"
Browse files Browse the repository at this point in the history
This reverts commit 97d79b4.

This fails to account for d_parent changes due to rename or disconnected
dentries due to submounts or NFS reexports.

Signed-off-by: Sage Weil <sage@newdream.net>
  • Loading branch information
Sage Weil committed Mar 3, 2011
1 parent f5412be commit 9bde178
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
5 changes: 1 addition & 4 deletions fs/ceph/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ int ceph_init_dentry(struct dentry *dentry)
}
di->dentry = dentry;
di->lease_session = NULL;
di->parent_inode = igrab(dentry->d_parent->d_inode);
dentry->d_fsdata = di;
dentry->d_time = jiffies;
ceph_dentry_lru_add(dentry);
Expand Down Expand Up @@ -1034,7 +1033,7 @@ static void ceph_dentry_release(struct dentry *dentry)
u64 snapid = CEPH_NOSNAP;

if (!IS_ROOT(dentry)) {
parent_inode = di->parent_inode;
parent_inode = dentry->d_parent->d_inode;
if (parent_inode)
snapid = ceph_snap(parent_inode);
}
Expand All @@ -1059,8 +1058,6 @@ static void ceph_dentry_release(struct dentry *dentry)
kmem_cache_free(ceph_dentry_cachep, di);
dentry->d_fsdata = NULL;
}
if (parent_inode)
iput(parent_inode);
}

static int ceph_snapdir_d_revalidate(struct dentry *dentry,
Expand Down
1 change: 0 additions & 1 deletion fs/ceph/super.h
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ struct ceph_dentry_info {
struct dentry *dentry;
u64 time;
u64 offset;
struct inode *parent_inode;
};

struct ceph_inode_xattrs_info {
Expand Down

0 comments on commit 9bde178

Please sign in to comment.