diff options
author | David S. Miller <davem@davemloft.net> | 2010-04-11 13:44:30 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-04-11 13:44:30 +0400 |
commit | 4a1032faac94ebbf647460ae3e06fc21146eb280 (patch) | |
tree | 7f31b97beb0406faa1523e619289ad0ab07c9787 /fs/ceph/inode.c | |
parent | ae4e8d63b5619d4d95f1d2bfa2b836caa6e62d06 (diff) | |
parent | 0eddb519b9127c73d53db4bf3ec1d45b13f844d1 (diff) | |
download | linux-4a1032faac94ebbf647460ae3e06fc21146eb280.tar.xz |
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Diffstat (limited to 'fs/ceph/inode.c')
-rw-r--r-- | fs/ceph/inode.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index 7abe1aed819b..aca82d55cc53 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -378,6 +378,22 @@ void ceph_destroy_inode(struct inode *inode) ceph_queue_caps_release(inode); + /* + * we may still have a snap_realm reference if there are stray + * caps in i_cap_exporting_issued or i_snap_caps. + */ + if (ci->i_snap_realm) { + struct ceph_mds_client *mdsc = + &ceph_client(ci->vfs_inode.i_sb)->mdsc; + struct ceph_snap_realm *realm = ci->i_snap_realm; + + dout(" dropping residual ref to snap realm %p\n", realm); + spin_lock(&realm->inodes_with_caps_lock); + list_del_init(&ci->i_snap_realm_item); + spin_unlock(&realm->inodes_with_caps_lock); + ceph_put_snap_realm(mdsc, realm); + } + kfree(ci->i_symlink); while ((n = rb_first(&ci->i_fragtree)) != NULL) { frag = rb_entry(n, struct ceph_inode_frag, node); |