btrfs: 32-bit type problems
An assorted set of casts to get rid of the warnings on 32-bit archs.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index 4aacf99..96df1b1 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -188,7 +188,7 @@
while (size > 0) {
page = pages[i];
kaddr = kmap_atomic(page, KM_USER0);
- cur_size = min(PAGE_CACHE_SIZE - page_offset, size);
+ cur_size = min_t(size_t, PAGE_CACHE_SIZE - page_offset, size);
write_extent_buffer(leaf, kaddr + page_offset, ptr, cur_size);
kunmap_atomic(kaddr, KM_USER0);
page_offset = 0;