]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
Btrfs: kill reserved_bytes in inode
authorJosef Bacik <josef@redhat.com>
Thu, 14 Jul 2011 20:02:04 +0000 (16:02 -0400)
committerJosef Bacik <josef@redhat.com>
Wed, 19 Oct 2011 19:12:28 +0000 (15:12 -0400)
reserved_bytes is not used for anything in the inode, remove it.

Signed-off-by: Josef Bacik <josef@redhat.com>
fs/btrfs/btrfs_inode.h
fs/btrfs/extent-tree.c
fs/btrfs/inode.c

index bf325f40cf9221e7129f70ff45736cd9df9eb5d1..c70fb10a307b797b3edd5851bdb6d4fed8e3031d 100644 (file)
@@ -103,11 +103,6 @@ struct btrfs_inode {
         */
        u64 delalloc_bytes;
 
-       /* total number of bytes that may be used for this inode for
-        * delalloc
-        */
-       u64 reserved_bytes;
-
        /*
         * the size of the file stored in the metadata on disk.  data=ordered
         * means the in-memory i_size might be larger than the size on disk
index f5be06a2462f4b01b5bba3834c1527a3a0c5bf18..03edac4f777157bbe658561001d13db6f52da9d5 100644 (file)
@@ -3122,7 +3122,6 @@ commit_trans:
                return -ENOSPC;
        }
        data_sinfo->bytes_may_use += bytes;
-       BTRFS_I(inode)->reserved_bytes += bytes;
        spin_unlock(&data_sinfo->lock);
 
        return 0;
@@ -3144,7 +3143,6 @@ void btrfs_free_reserved_data_space(struct inode *inode, u64 bytes)
        data_sinfo = BTRFS_I(inode)->space_info;
        spin_lock(&data_sinfo->lock);
        data_sinfo->bytes_may_use -= bytes;
-       BTRFS_I(inode)->reserved_bytes -= bytes;
        spin_unlock(&data_sinfo->lock);
 }
 
index b2d004ad66a0159042c38f96691c92bb0c31537e..156c3a0da792f5561568df2617c2cee6b4ccd17c 100644 (file)
@@ -6755,7 +6755,6 @@ struct inode *btrfs_alloc_inode(struct super_block *sb)
        ei->last_sub_trans = 0;
        ei->logged_trans = 0;
        ei->delalloc_bytes = 0;
-       ei->reserved_bytes = 0;
        ei->disk_i_size = 0;
        ei->flags = 0;
        ei->index_cnt = (u64)-1;