Message ID | 1397492316-12237-1-git-send-email-a3at.mail@gmail.com |
---|---|
State | Accepted, archived |
Headers | show |
On Mon, Apr 14, 2014 at 08:18:36PM +0400, Azat Khuzhin wrote: > With bigalloc enabled we must use EXT4_CLUSTERS_PER_GROUP() instead of > EXT4_BLOCKS_PER_GROUP() otherwise we will go beyond the allocated buffer. You forgot the signed-off-by, since it's a one-line patch, I'll apply it. Thanks! - Ted -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c index 6ea7b14..5c56785 100644 --- a/fs/ext4/balloc.c +++ b/fs/ext4/balloc.c @@ -667,7 +667,7 @@ ext4_fsblk_t ext4_count_free_clusters(struct super_block *sb) continue; x = ext4_count_free(bitmap_bh->b_data, - EXT4_BLOCKS_PER_GROUP(sb) / 8); + EXT4_CLUSTERS_PER_GROUP(sb) / 8); printk(KERN_DEBUG "group %u: stored = %d, counted = %u\n", i, ext4_free_group_clusters(sb, gdp), x); bitmap_count += x;