aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent_io.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-11-11 09:34:41 -0500
committerChris Mason <chris.mason@oracle.com>2008-11-11 09:34:41 -0500
commit5b050f04c8ce911c5b6831305a24d70eab95e732 (patch)
treeebc7be1f9526a75a8d7ac7a7984c20d728ca96d1 /fs/btrfs/extent_io.c
parent8247b41ac980d125de8aeba6f33f381056ac0ecb (diff)
Btrfs: Fix compile warnings on 32 bit machines
Simple casting here and there to fix things up. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/extent_io.c')
-rw-r--r--fs/btrfs/extent_io.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 5cc0082379ce..54d013c3bb88 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -1157,7 +1157,8 @@ static noinline int __unlock_for_delalloc(struct inode *inode,
1157 1157
1158 while(nr_pages > 0) { 1158 while(nr_pages > 0) {
1159 ret = find_get_pages_contig(inode->i_mapping, index, 1159 ret = find_get_pages_contig(inode->i_mapping, index,
1160 min(nr_pages, ARRAY_SIZE(pages)), pages); 1160 min_t(unsigned long, nr_pages,
1161 ARRAY_SIZE(pages)), pages);
1161 for (i = 0; i < ret; i++) { 1162 for (i = 0; i < ret; i++) {
1162 if (pages[i] != locked_page) 1163 if (pages[i] != locked_page)
1163 unlock_page(pages[i]); 1164 unlock_page(pages[i]);
@@ -1192,7 +1193,8 @@ static noinline int lock_delalloc_pages(struct inode *inode,
1192 nrpages = end_index - index + 1; 1193 nrpages = end_index - index + 1;
1193 while(nrpages > 0) { 1194 while(nrpages > 0) {
1194 ret = find_get_pages_contig(inode->i_mapping, index, 1195 ret = find_get_pages_contig(inode->i_mapping, index,
1195 min(nrpages, ARRAY_SIZE(pages)), pages); 1196 min_t(unsigned long,
1197 nrpages, ARRAY_SIZE(pages)), pages);
1196 if (ret == 0) { 1198 if (ret == 0) {
1197 ret = -EAGAIN; 1199 ret = -EAGAIN;
1198 goto done; 1200 goto done;
@@ -1346,7 +1348,8 @@ int extent_clear_unlock_delalloc(struct inode *inode,
1346 1348
1347 while(nr_pages > 0) { 1349 while(nr_pages > 0) {
1348 ret = find_get_pages_contig(inode->i_mapping, index, 1350 ret = find_get_pages_contig(inode->i_mapping, index,
1349 min(nr_pages, ARRAY_SIZE(pages)), pages); 1351 min_t(unsigned long,
1352 nr_pages, ARRAY_SIZE(pages)), pages);
1350 for (i = 0; i < ret; i++) { 1353 for (i = 0; i < ret; i++) {
1351 if (pages[i] == locked_page) { 1354 if (pages[i] == locked_page) {
1352 page_cache_release(pages[i]); 1355 page_cache_release(pages[i]);
@@ -1896,7 +1899,7 @@ static int submit_extent_page(int rw, struct extent_io_tree *tree,
1896 int contig = 0; 1899 int contig = 0;
1897 int this_compressed = bio_flags & EXTENT_BIO_COMPRESSED; 1900 int this_compressed = bio_flags & EXTENT_BIO_COMPRESSED;
1898 int old_compressed = prev_bio_flags & EXTENT_BIO_COMPRESSED; 1901 int old_compressed = prev_bio_flags & EXTENT_BIO_COMPRESSED;
1899 size_t page_size = min(size, PAGE_CACHE_SIZE); 1902 size_t page_size = min_t(size_t, size, PAGE_CACHE_SIZE);
1900 1903
1901 if (bio_ret && *bio_ret) { 1904 if (bio_ret && *bio_ret) {
1902 bio = *bio_ret; 1905 bio = *bio_ret;