From 66919e5759425aeaa8d42b88a92f5263ff45a67e Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Mon, 14 Nov 2016 21:25:12 -0500 Subject: [PATCH] add patch fix-mballoc-breakage-with-64k-block-size --- fix-mballoc-breakage-with-64k-block-size | 35 ++++++++++++++++++++++++++++++++ series | 3 +++ timestamps | 7 ++++--- 3 files changed, 42 insertions(+), 3 deletions(-) create mode 100644 fix-mballoc-breakage-with-64k-block-size diff --git a/fix-mballoc-breakage-with-64k-block-size b/fix-mballoc-breakage-with-64k-block-size new file mode 100644 index 00000000..b501b7f6 --- /dev/null +++ b/fix-mballoc-breakage-with-64k-block-size @@ -0,0 +1,35 @@ +ext4: fix mballoc breakage with 64k block size + +From: Chandan Rajendra + +'border' variable is set to a value of 2 times the block size of the +underlying filesystem. With 64k block size, the resulting value won't +fit into a 16-bit variable. Hence this commit changes the data type of +'border' to 'unsigned int'. + +Fixes: c9de560ded61f +Signed-off-by: Chandan Rajendra +Signed-off-by: Theodore Ts'o +Reviewed-by: Andreas Dilger +Cc: stable@vger.kernel.org +--- + fs/ext4/mballoc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c +index f418f55..a937ac7 100644 +--- a/fs/ext4/mballoc.c ++++ b/fs/ext4/mballoc.c +@@ -669,7 +669,7 @@ static void ext4_mb_mark_free_simple(struct super_block *sb, + ext4_grpblk_t min; + ext4_grpblk_t max; + ext4_grpblk_t chunk; +- unsigned short border; ++ unsigned int border; + + BUG_ON(len > EXT4_CLUSTERS_PER_GROUP(sb)); + +-- +2.5.5 + + diff --git a/series b/series index 83d4b1da..7894e22b 100644 --- a/series +++ b/series @@ -4,6 +4,9 @@ allow-ext4_truncate-to-return-an-error allow-ext4_ext_truncate-to-return-an-error dont-lock-buffer-head-in-ext4_commit_super-if-holding-spinlock +fix-mballoc-breakage-with-64k-block-size + + #################################################### # unstable patches #################################################### diff --git a/timestamps b/timestamps index d156a105..08e5b95f 100755 --- a/timestamps +++ b/timestamps @@ -47,6 +47,7 @@ touch -d @1479092546 allow-ext4_truncate-to-return-an-error touch -d @1479092548 allow-ext4_ext_truncate-to-return-an-error touch -d @1479092549 dont-lock-buffer-head-in-ext4_commit_super-if-holding-spinlock touch -d @1479092551 stable-boundary -touch -d @1479176106 status -touch -d @1479176225 series -touch -d @1479176302 timestamps +touch -d @1479175477 fix-mballoc-breakage-with-64k-block-size +touch -d @1479176603 series +touch -d @1479176608 status +touch -d @1479176703 timestamps -- 2.11.4.GIT