Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 360486
b: refs/heads/master
c: 8c4ce81
h: refs/heads/master
v: v3
  • Loading branch information
Liu Bo authored and Josef Bacik committed Feb 26, 2013
1 parent b05fe44 commit da9d7dc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 26 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: 2382c5cc7ed0396b61a359765bf5ee125b0a2f46
refs/heads/master: 8c4ce81e911ab6c84e4f75e18d4ceb3fa555c35b
25 changes: 0 additions & 25 deletions trunk/fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -8060,29 +8060,6 @@ static int btrfs_getattr(struct vfsmount *mnt,
return 0;
}

/*
* If a file is moved, it will inherit the cow and compression flags of the new
* directory.
*/
static void fixup_inode_flags(struct inode *dir, struct inode *inode)
{
struct btrfs_inode *b_dir = BTRFS_I(dir);
struct btrfs_inode *b_inode = BTRFS_I(inode);

if (b_dir->flags & BTRFS_INODE_NODATACOW)
b_inode->flags |= BTRFS_INODE_NODATACOW;
else
b_inode->flags &= ~BTRFS_INODE_NODATACOW;

if (b_dir->flags & BTRFS_INODE_COMPRESS) {
b_inode->flags |= BTRFS_INODE_COMPRESS;
b_inode->flags &= ~BTRFS_INODE_NOCOMPRESS;
} else {
b_inode->flags &= ~(BTRFS_INODE_COMPRESS |
BTRFS_INODE_NOCOMPRESS);
}
}

static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry,
struct inode *new_dir, struct dentry *new_dentry)
{
Expand Down Expand Up @@ -8248,8 +8225,6 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry,
}
}

fixup_inode_flags(new_dir, old_inode);

ret = btrfs_add_link(trans, new_dir, old_inode,
new_dentry->d_name.name,
new_dentry->d_name.len, 0, index);
Expand Down

0 comments on commit da9d7dc

Please sign in to comment.