diff options
author | Sage Weil <sage@newdream.net> | 2011-02-28 12:47:37 -0500 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2011-03-03 13:09:50 -0500 |
commit | 9bde178d052418af0b8e0f12932cf02ab4764c9d (patch) | |
tree | e70cf12b6687ce93005ca97937e5b79da42e09a1 | |
parent | f5412be599602124d2bdd49947b231dd77c0bf99 (diff) |
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>
-rw-r--r-- | fs/ceph/dir.c | 5 | ||||
-rw-r--r-- | fs/ceph/super.h | 1 |
2 files changed, 1 insertions, 5 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) | |||
60 | } | 60 | } |
61 | di->dentry = dentry; | 61 | di->dentry = dentry; |
62 | di->lease_session = NULL; | 62 | di->lease_session = NULL; |
63 | di->parent_inode = igrab(dentry->d_parent->d_inode); | ||
64 | dentry->d_fsdata = di; | 63 | dentry->d_fsdata = di; |
65 | dentry->d_time = jiffies; | 64 | dentry->d_time = jiffies; |
66 | ceph_dentry_lru_add(dentry); | 65 | ceph_dentry_lru_add(dentry); |
@@ -1034,7 +1033,7 @@ static void ceph_dentry_release(struct dentry *dentry) | |||
1034 | u64 snapid = CEPH_NOSNAP; | 1033 | u64 snapid = CEPH_NOSNAP; |
1035 | 1034 | ||
1036 | if (!IS_ROOT(dentry)) { | 1035 | if (!IS_ROOT(dentry)) { |
1037 | parent_inode = di->parent_inode; | 1036 | parent_inode = dentry->d_parent->d_inode; |
1038 | if (parent_inode) | 1037 | if (parent_inode) |
1039 | snapid = ceph_snap(parent_inode); | 1038 | snapid = ceph_snap(parent_inode); |
1040 | } | 1039 | } |
@@ -1059,8 +1058,6 @@ static void ceph_dentry_release(struct dentry *dentry) | |||
1059 | kmem_cache_free(ceph_dentry_cachep, di); | 1058 | kmem_cache_free(ceph_dentry_cachep, di); |
1060 | dentry->d_fsdata = NULL; | 1059 | dentry->d_fsdata = NULL; |
1061 | } | 1060 | } |
1062 | if (parent_inode) | ||
1063 | iput(parent_inode); | ||
1064 | } | 1061 | } |
1065 | 1062 | ||
1066 | static int ceph_snapdir_d_revalidate(struct dentry *dentry, | 1063 | static int ceph_snapdir_d_revalidate(struct dentry *dentry, |
diff --git a/fs/ceph/super.h b/fs/ceph/super.h index 88fcaa21b801..20b907d76ae2 100644 --- a/fs/ceph/super.h +++ b/fs/ceph/super.h | |||
@@ -207,7 +207,6 @@ struct ceph_dentry_info { | |||
207 | struct dentry *dentry; | 207 | struct dentry *dentry; |
208 | u64 time; | 208 | u64 time; |
209 | u64 offset; | 209 | u64 offset; |
210 | struct inode *parent_inode; | ||
211 | }; | 210 | }; |
212 | 211 | ||
213 | struct ceph_inode_xattrs_info { | 212 | struct ceph_inode_xattrs_info { |