diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-11-11 09:34:41 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-11-11 09:34:41 -0500 |
commit | 5b050f04c8ce911c5b6831305a24d70eab95e732 (patch) | |
tree | ebc7be1f9526a75a8d7ac7a7984c20d728ca96d1 /fs/btrfs/extent_io.c | |
parent | 8247b41ac980d125de8aeba6f33f381056ac0ecb (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.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 5cc0082379c..54d013c3bb8 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, while(nr_pages > 0) { ret = find_get_pages_contig(inode->i_mapping, index, - min(nr_pages, ARRAY_SIZE(pages)), pages); + min_t(unsigned long, nr_pages, + ARRAY_SIZE(pages)), pages); for (i = 0; i < ret; i++) { if (pages[i] != locked_page) unlock_page(pages[i]); @@ -1192,7 +1193,8 @@ static noinline int lock_delalloc_pages(struct inode *inode, nrpages = end_index - index + 1; while(nrpages > 0) { ret = find_get_pages_contig(inode->i_mapping, index, - min(nrpages, ARRAY_SIZE(pages)), pages); + min_t(unsigned long, + nrpages, ARRAY_SIZE(pages)), pages); if (ret == 0) { ret = -EAGAIN; goto done; @@ -1346,7 +1348,8 @@ int extent_clear_unlock_delalloc(struct inode *inode, while(nr_pages > 0) { ret = find_get_pages_contig(inode->i_mapping, index, - min(nr_pages, ARRAY_SIZE(pages)), pages); + min_t(unsigned long, + nr_pages, ARRAY_SIZE(pages)), pages); for (i = 0; i < ret; i++) { if (pages[i] == locked_page) { page_cache_release(pages[i]); @@ -1896,7 +1899,7 @@ static int submit_extent_page(int rw, struct extent_io_tree *tree, int contig = 0; int this_compressed = bio_flags & EXTENT_BIO_COMPRESSED; int old_compressed = prev_bio_flags & EXTENT_BIO_COMPRESSED; - size_t page_size = min(size, PAGE_CACHE_SIZE); + size_t page_size = min_t(size_t, size, PAGE_CACHE_SIZE); if (bio_ret && *bio_ret) { bio = *bio_ret; |