ext4: ext4_get_reserved_space() must return bytes instead of blocks
authorDmitry Monakhov <dmonakhov@openvz.org>
Wed, 9 Dec 2009 03:41:52 +0000 (22:41 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 14 Dec 2009 17:45:21 +0000 (09:45 -0800)
(cherry picked from commit 8aa6790f876e81f5a2211fe1711a5fe3fe2d7b20)

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Acked-by: Mingming Cao <cmm@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/ext4/inode.c

index 87406c61eca11d82f1a798045b87bcb36270bf90..86469775cca4d76d34191f43a43ed332e216b15b 100644 (file)
@@ -1052,7 +1052,7 @@ qsize_t ext4_get_reserved_space(struct inode *inode)
                EXT4_I(inode)->i_reserved_meta_blocks;
        spin_unlock(&EXT4_I(inode)->i_block_reservation_lock);
 
-       return total;
+       return (total << inode->i_blkbits);
 }
 /*
  * Calculate the number of metadata blocks need to reserve