Check in Jan Kara's v3 DAX iomap patches
[ext4-patch-queue.git] / fix-mballoc-breakage-with-64k-block-size
blobb501b7f64510ba4825fbf3c9686cdd7bb815c733
1 ext4: fix mballoc breakage with 64k block size
3 From: Chandan Rajendra <chandan@linux.vnet.ibm.com>
5 'border' variable is set to a value of 2 times the block size of the
6 underlying filesystem. With 64k block size, the resulting value won't
7 fit into a 16-bit variable. Hence this commit changes the data type of
8 'border' to 'unsigned int'.
10 Fixes: c9de560ded61f
11 Signed-off-by: Chandan Rajendra <chandan@linux.vnet.ibm.com>
12 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
13 Reviewed-by: Andreas Dilger <adilger@dilger.ca>
14 Cc: stable@vger.kernel.org
15 ---
16  fs/ext4/mballoc.c | 2 +-
17  1 file changed, 1 insertion(+), 1 deletion(-)
19 diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
20 index f418f55..a937ac7 100644
21 --- a/fs/ext4/mballoc.c
22 +++ b/fs/ext4/mballoc.c
23 @@ -669,7 +669,7 @@ static void ext4_mb_mark_free_simple(struct super_block *sb,
24         ext4_grpblk_t min;
25         ext4_grpblk_t max;
26         ext4_grpblk_t chunk;
27 -       unsigned short border;
28 +       unsigned int border;
30         BUG_ON(len > EXT4_CLUSTERS_PER_GROUP(sb));
32 -- 
33 2.5.5