Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 360461
b: refs/heads/master
c: fa6ac87
h: refs/heads/master
i:
  360459: 899cf57
v: v3
  • Loading branch information
Liu Bo authored and Josef Bacik committed Feb 20, 2013
1 parent 23b4194 commit 8ca6a4d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d4edf39bd5db443151efc993dac67ec9d6b5b8c1
refs/heads/master: fa6ac8765c48a06dfed914e8c8c3a903f9d313a0
3 changes: 2 additions & 1 deletion trunk/fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -7315,8 +7315,9 @@ int btrfs_drop_inode(struct inode *inode)
{
struct btrfs_root *root = BTRFS_I(inode)->root;

/* the snap/subvol tree is on deleting */
if (btrfs_root_refs(&root->root_item) == 0 &&
!btrfs_is_free_space_inode(inode))
root != root->fs_info->tree_root)
return 1;
else
return generic_drop_inode(inode);
Expand Down
6 changes: 6 additions & 0 deletions trunk/fs/btrfs/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -2174,6 +2174,12 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file,
shrink_dcache_sb(root->fs_info->sb);
btrfs_invalidate_inodes(dest);
d_delete(dentry);

/* the last ref */
if (dest->cache_inode) {
iput(dest->cache_inode);
dest->cache_inode = NULL;
}
}
out_dput:
dput(dentry);
Expand Down

0 comments on commit 8ca6a4d

Please sign in to comment.