diff options
author | Sage Weil <sage@newdream.net> | 2011-02-28 12:49:15 -0800 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2011-03-03 10:09:52 -0800 |
commit | 16a8b70a5a757db513f036bbcc73309f6c507d81 (patch) | |
tree | e075716a8e58149894fcad3fa36ebf6ea16cfc6e /fs | |
parent | b545cc1505eb49247071ce9f4092665de788ca00 (diff) | |
download | linux-16a8b70a5a757db513f036bbcc73309f6c507d81.tar.gz linux-16a8b70a5a757db513f036bbcc73309f6c507d81.tar.bz2 linux-16a8b70a5a757db513f036bbcc73309f6c507d81.zip |
ceph: do not clear I_COMPLETE from d_release
First, this was racy anyway: d_release isn't called until well after the
dentry is unhashed. Second, this runs afoul of the recent dcache change
that clears d_parent prior to calling d_release (949854d0), causing a NULL
pointer dereference.
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ceph/dir.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index 9b4f9d9947b3..196fd4c62db7 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c @@ -1029,28 +1029,8 @@ out_touch: static void ceph_dentry_release(struct dentry *dentry) { struct ceph_dentry_info *di = ceph_dentry(dentry); - struct inode *parent_inode = NULL; - u64 snapid = CEPH_NOSNAP; - if (!IS_ROOT(dentry)) { - parent_inode = dentry->d_parent->d_inode; - if (parent_inode) - snapid = ceph_snap(parent_inode); - } - dout("dentry_release %p parent %p\n", dentry, parent_inode); - if (parent_inode && snapid != CEPH_SNAPDIR) { - struct ceph_inode_info *ci = ceph_inode(parent_inode); - - spin_lock(&parent_inode->i_lock); - if (ci->i_shared_gen == di->lease_shared_gen || - snapid <= CEPH_MAXSNAP) { - dout(" clearing %p complete (d_release)\n", - parent_inode); - ci->i_ceph_flags &= ~CEPH_I_COMPLETE; - ci->i_release_count++; - } - spin_unlock(&parent_inode->i_lock); - } + dout("dentry_release %p\n", dentry); if (di) { ceph_dentry_lru_del(dentry); if (di->lease_session) |