diff options
Diffstat (limited to 'fs/ext4/mballoc.c')
-rw-r--r-- | fs/ext4/mballoc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index f7ab34088162..8b24d3d42cb3 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/log2.h> | 14 | #include <linux/log2.h> |
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
17 | #include <linux/nospec.h> | ||
17 | #include <linux/backing-dev.h> | 18 | #include <linux/backing-dev.h> |
18 | #include <trace/events/ext4.h> | 19 | #include <trace/events/ext4.h> |
19 | 20 | ||
@@ -2140,7 +2141,8 @@ ext4_mb_regular_allocator(struct ext4_allocation_context *ac) | |||
2140 | * This should tell if fe_len is exactly power of 2 | 2141 | * This should tell if fe_len is exactly power of 2 |
2141 | */ | 2142 | */ |
2142 | if ((ac->ac_g_ex.fe_len & (~(1 << (i - 1)))) == 0) | 2143 | if ((ac->ac_g_ex.fe_len & (~(1 << (i - 1)))) == 0) |
2143 | ac->ac_2order = i - 1; | 2144 | ac->ac_2order = array_index_nospec(i - 1, |
2145 | sb->s_blocksize_bits + 2); | ||
2144 | } | 2146 | } |
2145 | 2147 | ||
2146 | /* if stream allocation is enabled, use global goal */ | 2148 | /* if stream allocation is enabled, use global goal */ |