diff options
| author | Paul Keith <javelinanddart@gmail.com> | 2018-03-14 14:05:38 +0100 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2018-12-02 01:33:57 +0100 |
| commit | d9dbee633b72abf9ac55b323b7552c30c224a51a (patch) | |
| tree | 2b91c60757b0459ce18816e534d2bbaf23a31266 /fs | |
| parent | f60b21f4592246566ec9fe685ddaa24fff2c0e06 (diff) | |
fs: sdfat: Fix compilation for 32-bit targets
Change-Id: I9a9f3e253001bfbb3a209bd16d2741c95c99f46b
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/sdfat/amap_smart.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/sdfat/amap_smart.c b/fs/sdfat/amap_smart.c index 5a76bd96b..b556f868d 100644 --- a/fs/sdfat/amap_smart.c +++ b/fs/sdfat/amap_smart.c @@ -325,6 +325,7 @@ int amap_create(struct super_block *sb, u32 pack_ratio, u32 sect_per_au, u32 hid int i, i_clu, i_au; int i_au_root = -1, i_au_hot_from = INT_MAX; u32 misaligned_sect = hidden_sect; + u64 tmp; BUG_ON(!fsi->bd_opened); @@ -383,7 +384,9 @@ int amap_create(struct super_block *sb, u32 pack_ratio, u32 sect_per_au, u32 hid amap->sb = sb; - amap->n_au = (fsi->num_sectors + misaligned_sect + sect_per_au - 1) / sect_per_au; + tmp = fsi->num_sectors + misaligned_sect + sect_per_au - 1; + do_div(tmp, sect_per_au); + amap->n_au = tmp; amap->n_clean_au = 0; amap->n_full_au = 0; |
