Commit 93dbfad7 authored by Heiko Carstens's avatar Heiko Carstens Committed by Chris Mason

Btrfs: fix __ucmpdi2 compile bug on 32 bit builds

We get this on 32 builds:

fs/built-in.o: In function `extent_fiemap':
(.text+0x1019f2): undefined reference to `__ucmpdi2'

Happens because of a switch statement with a 64 bit argument.
Convert this to an if statement to fix this.
Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
parent 09771430
...@@ -2884,25 +2884,19 @@ int extent_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, ...@@ -2884,25 +2884,19 @@ int extent_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
disko = 0; disko = 0;
flags = 0; flags = 0;
switch (em->block_start) { if (em->block_start == EXTENT_MAP_LAST_BYTE) {
case EXTENT_MAP_LAST_BYTE:
end = 1; end = 1;
flags |= FIEMAP_EXTENT_LAST; flags |= FIEMAP_EXTENT_LAST;
break; } else if (em->block_start == EXTENT_MAP_HOLE) {
case EXTENT_MAP_HOLE:
flags |= FIEMAP_EXTENT_UNWRITTEN; flags |= FIEMAP_EXTENT_UNWRITTEN;
break; } else if (em->block_start == EXTENT_MAP_INLINE) {
case EXTENT_MAP_INLINE:
flags |= (FIEMAP_EXTENT_DATA_INLINE | flags |= (FIEMAP_EXTENT_DATA_INLINE |
FIEMAP_EXTENT_NOT_ALIGNED); FIEMAP_EXTENT_NOT_ALIGNED);
break; } else if (em->block_start == EXTENT_MAP_DELALLOC) {
case EXTENT_MAP_DELALLOC:
flags |= (FIEMAP_EXTENT_DELALLOC | flags |= (FIEMAP_EXTENT_DELALLOC |
FIEMAP_EXTENT_UNKNOWN); FIEMAP_EXTENT_UNKNOWN);
break; } else {
default:
disko = em->block_start; disko = em->block_start;
break;
} }
if (test_bit(EXTENT_FLAG_COMPRESSED, &em->flags)) if (test_bit(EXTENT_FLAG_COMPRESSED, &em->flags))
flags |= FIEMAP_EXTENT_ENCODED; flags |= FIEMAP_EXTENT_ENCODED;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment