diff options
Diffstat (limited to 'fs/btrfs/ioctl.c')
-rw-r--r-- | fs/btrfs/ioctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 04de767a8db2..ab7a0f61ded8 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c | |||
@@ -99,7 +99,7 @@ static noinline int create_subvol(struct btrfs_root *root, char *name, | |||
99 | inode_item->generation = cpu_to_le64(1); | 99 | inode_item->generation = cpu_to_le64(1); |
100 | inode_item->size = cpu_to_le64(3); | 100 | inode_item->size = cpu_to_le64(3); |
101 | inode_item->nlink = cpu_to_le32(1); | 101 | inode_item->nlink = cpu_to_le32(1); |
102 | inode_item->nblocks = cpu_to_le64(1); | 102 | inode_item->nbytes = cpu_to_le64(root->leafsize); |
103 | inode_item->mode = cpu_to_le32(S_IFDIR | 0755); | 103 | inode_item->mode = cpu_to_le32(S_IFDIR | 0755); |
104 | 104 | ||
105 | btrfs_set_root_bytenr(&root_item, leaf->start); | 105 | btrfs_set_root_bytenr(&root_item, leaf->start); |
@@ -671,7 +671,7 @@ out: | |||
671 | btrfs_release_path(root, path); | 671 | btrfs_release_path(root, path); |
672 | if (ret == 0) { | 672 | if (ret == 0) { |
673 | inode->i_mtime = inode->i_ctime = CURRENT_TIME; | 673 | inode->i_mtime = inode->i_ctime = CURRENT_TIME; |
674 | inode->i_blocks = src->i_blocks; | 674 | inode_set_bytes(inode, inode_get_bytes(src)); |
675 | btrfs_i_size_write(inode, src->i_size); | 675 | btrfs_i_size_write(inode, src->i_size); |
676 | BTRFS_I(inode)->flags = BTRFS_I(src)->flags; | 676 | BTRFS_I(inode)->flags = BTRFS_I(src)->flags; |
677 | ret = btrfs_update_inode(trans, root, inode); | 677 | ret = btrfs_update_inode(trans, root, inode); |