summaryrefslogtreecommitdiffstats
path: root/fs/ceph/dir.c
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2011-02-28 09:47:37 -0800
committerSage Weil <sage@newdream.net>2011-03-03 10:09:50 -0800
commit9bde178d052418af0b8e0f12932cf02ab4764c9d (patch)
treee70cf12b6687ce93005ca97937e5b79da42e09a1 /fs/ceph/dir.c
parentf5412be599602124d2bdd49947b231dd77c0bf99 (diff)
downloadlinux-9bde178d052418af0b8e0f12932cf02ab4764c9d.tar.gz
linux-9bde178d052418af0b8e0f12932cf02ab4764c9d.tar.bz2
linux-9bde178d052418af0b8e0f12932cf02ab4764c9d.zip
Revert "ceph: keep reference to parent inode on ceph_dentry"
This reverts commit 97d79b403ef03f729883246208ef5d8a2ebc4d68. 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>
Diffstat (limited to 'fs/ceph/dir.c')
-rw-r--r--fs/ceph/dir.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c
index f0aef787a102..0bc68de8edd7 100644
--- a/fs/ceph/dir.c
+++ b/fs/ceph/dir.c
@@ -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);
@@ -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);
}
@@ -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,