aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/inode.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 14c82cdbb696..be09654e11b9 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -8060,29 +8060,6 @@ static int btrfs_getattr(struct vfsmount *mnt,
8060 return 0; 8060 return 0;
8061} 8061}
8062 8062
8063/*
8064 * If a file is moved, it will inherit the cow and compression flags of the new
8065 * directory.
8066 */
8067static void fixup_inode_flags(struct inode *dir, struct inode *inode)
8068{
8069 struct btrfs_inode *b_dir = BTRFS_I(dir);
8070 struct btrfs_inode *b_inode = BTRFS_I(inode);
8071
8072 if (b_dir->flags & BTRFS_INODE_NODATACOW)
8073 b_inode->flags |= BTRFS_INODE_NODATACOW;
8074 else
8075 b_inode->flags &= ~BTRFS_INODE_NODATACOW;
8076
8077 if (b_dir->flags & BTRFS_INODE_COMPRESS) {
8078 b_inode->flags |= BTRFS_INODE_COMPRESS;
8079 b_inode->flags &= ~BTRFS_INODE_NOCOMPRESS;
8080 } else {
8081 b_inode->flags &= ~(BTRFS_INODE_COMPRESS |
8082 BTRFS_INODE_NOCOMPRESS);
8083 }
8084}
8085
8086static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry, 8063static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry,
8087 struct inode *new_dir, struct dentry *new_dentry) 8064 struct inode *new_dir, struct dentry *new_dentry)
8088{ 8065{
@@ -8248,8 +8225,6 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry,
8248 } 8225 }
8249 } 8226 }
8250 8227
8251 fixup_inode_flags(new_dir, old_inode);
8252
8253 ret = btrfs_add_link(trans, new_dir, old_inode, 8228 ret = btrfs_add_link(trans, new_dir, old_inode,
8254 new_dentry->d_name.name, 8229 new_dentry->d_name.name,
8255 new_dentry->d_name.len, 0, index); 8230 new_dentry->d_name.len, 0, index);