Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 167259
b: refs/heads/master
c: efefb14
h: refs/heads/master
i:
  167257: 3923b21
  167255: 6421089
v: v3
  • Loading branch information
Yan, Zheng authored and Chris Mason committed Oct 9, 2009
1 parent b218781 commit c501c18
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 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: ff782e0a131c7f669445c07fe5c7ba91e043b7ed
refs/heads/master: efefb1438be269897585934fc6c05deb4dfa01ce
12 changes: 7 additions & 5 deletions trunk/fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -3629,12 +3629,14 @@ static int btrfs_dentry_delete(struct dentry *dentry)
{
struct btrfs_root *root;

if (!dentry->d_inode)
return 0;
if (!dentry->d_inode && !IS_ROOT(dentry))
dentry = dentry->d_parent;

root = BTRFS_I(dentry->d_inode)->root;
if (btrfs_root_refs(&root->root_item) == 0)
return 1;
if (dentry->d_inode) {
root = BTRFS_I(dentry->d_inode)->root;
if (btrfs_root_refs(&root->root_item) == 0)
return 1;
}
return 0;
}

Expand Down
1 change: 1 addition & 0 deletions trunk/fs/btrfs/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -830,6 +830,7 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file,
out_unlock:
mutex_unlock(&inode->i_mutex);
if (!err) {
shrink_dcache_sb(root->fs_info->sb);
btrfs_invalidate_inodes(dest);
d_delete(dentry);
}
Expand Down

0 comments on commit c501c18

Please sign in to comment.