mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-19 10:44:14 +08:00
Btrfs: PAGE_CACHE_SIZE is already unsigned long
PAGE_CACHE_SIZE == PAGE_SIZE is "unsigned long" everywhere, so there's no need to cast it to "unsigned long". Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Josef Bacik <jbacik@fusionio.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
This commit is contained in:
parent
b308bc2f05
commit
778746b53b
@ -1236,8 +1236,7 @@ static void btrfsic_read_from_block_data(
|
||||
unsigned long i = (start_offset + offset) >> PAGE_CACHE_SHIFT;
|
||||
|
||||
WARN_ON(offset + len > block_ctx->len);
|
||||
offset_in_page = (start_offset + offset) &
|
||||
((unsigned long)PAGE_CACHE_SIZE - 1);
|
||||
offset_in_page = (start_offset + offset) & (PAGE_CACHE_SIZE - 1);
|
||||
|
||||
while (len > 0) {
|
||||
cur = min(len, ((size_t)PAGE_CACHE_SIZE - offset_in_page));
|
||||
@ -3122,19 +3121,19 @@ int btrfsic_mount(struct btrfs_root *root,
|
||||
if (root->nodesize & ((u64)PAGE_CACHE_SIZE - 1)) {
|
||||
printk(KERN_INFO
|
||||
"btrfsic: cannot handle nodesize %d not being a multiple of PAGE_CACHE_SIZE %ld!\n",
|
||||
root->nodesize, (unsigned long)PAGE_CACHE_SIZE);
|
||||
root->nodesize, PAGE_CACHE_SIZE);
|
||||
return -1;
|
||||
}
|
||||
if (root->leafsize & ((u64)PAGE_CACHE_SIZE - 1)) {
|
||||
printk(KERN_INFO
|
||||
"btrfsic: cannot handle leafsize %d not being a multiple of PAGE_CACHE_SIZE %ld!\n",
|
||||
root->leafsize, (unsigned long)PAGE_CACHE_SIZE);
|
||||
root->leafsize, PAGE_CACHE_SIZE);
|
||||
return -1;
|
||||
}
|
||||
if (root->sectorsize & ((u64)PAGE_CACHE_SIZE - 1)) {
|
||||
printk(KERN_INFO
|
||||
"btrfsic: cannot handle sectorsize %d not being a multiple of PAGE_CACHE_SIZE %ld!\n",
|
||||
root->sectorsize, (unsigned long)PAGE_CACHE_SIZE);
|
||||
root->sectorsize, PAGE_CACHE_SIZE);
|
||||
return -1;
|
||||
}
|
||||
state = kzalloc(sizeof(*state), GFP_NOFS);
|
||||
|
@ -4873,7 +4873,7 @@ void read_extent_buffer(struct extent_buffer *eb, void *dstv,
|
||||
WARN_ON(start > eb->len);
|
||||
WARN_ON(start + len > eb->start + eb->len);
|
||||
|
||||
offset = (start_offset + start) & ((unsigned long)PAGE_CACHE_SIZE - 1);
|
||||
offset = (start_offset + start) & (PAGE_CACHE_SIZE - 1);
|
||||
|
||||
while (len > 0) {
|
||||
page = extent_buffer_page(eb, i);
|
||||
@ -4943,7 +4943,7 @@ int memcmp_extent_buffer(struct extent_buffer *eb, const void *ptrv,
|
||||
WARN_ON(start > eb->len);
|
||||
WARN_ON(start + len > eb->start + eb->len);
|
||||
|
||||
offset = (start_offset + start) & ((unsigned long)PAGE_CACHE_SIZE - 1);
|
||||
offset = (start_offset + start) & (PAGE_CACHE_SIZE - 1);
|
||||
|
||||
while (len > 0) {
|
||||
page = extent_buffer_page(eb, i);
|
||||
@ -4977,7 +4977,7 @@ void write_extent_buffer(struct extent_buffer *eb, const void *srcv,
|
||||
WARN_ON(start > eb->len);
|
||||
WARN_ON(start + len > eb->start + eb->len);
|
||||
|
||||
offset = (start_offset + start) & ((unsigned long)PAGE_CACHE_SIZE - 1);
|
||||
offset = (start_offset + start) & (PAGE_CACHE_SIZE - 1);
|
||||
|
||||
while (len > 0) {
|
||||
page = extent_buffer_page(eb, i);
|
||||
@ -5007,7 +5007,7 @@ void memset_extent_buffer(struct extent_buffer *eb, char c,
|
||||
WARN_ON(start > eb->len);
|
||||
WARN_ON(start + len > eb->start + eb->len);
|
||||
|
||||
offset = (start_offset + start) & ((unsigned long)PAGE_CACHE_SIZE - 1);
|
||||
offset = (start_offset + start) & (PAGE_CACHE_SIZE - 1);
|
||||
|
||||
while (len > 0) {
|
||||
page = extent_buffer_page(eb, i);
|
||||
@ -5038,7 +5038,7 @@ void copy_extent_buffer(struct extent_buffer *dst, struct extent_buffer *src,
|
||||
WARN_ON(src->len != dst_len);
|
||||
|
||||
offset = (start_offset + dst_offset) &
|
||||
((unsigned long)PAGE_CACHE_SIZE - 1);
|
||||
(PAGE_CACHE_SIZE - 1);
|
||||
|
||||
while (len > 0) {
|
||||
page = extent_buffer_page(dst, i);
|
||||
@ -5124,9 +5124,9 @@ void memcpy_extent_buffer(struct extent_buffer *dst, unsigned long dst_offset,
|
||||
|
||||
while (len > 0) {
|
||||
dst_off_in_page = (start_offset + dst_offset) &
|
||||
((unsigned long)PAGE_CACHE_SIZE - 1);
|
||||
(PAGE_CACHE_SIZE - 1);
|
||||
src_off_in_page = (start_offset + src_offset) &
|
||||
((unsigned long)PAGE_CACHE_SIZE - 1);
|
||||
(PAGE_CACHE_SIZE - 1);
|
||||
|
||||
dst_i = (start_offset + dst_offset) >> PAGE_CACHE_SHIFT;
|
||||
src_i = (start_offset + src_offset) >> PAGE_CACHE_SHIFT;
|
||||
@ -5177,9 +5177,9 @@ void memmove_extent_buffer(struct extent_buffer *dst, unsigned long dst_offset,
|
||||
src_i = (start_offset + src_end) >> PAGE_CACHE_SHIFT;
|
||||
|
||||
dst_off_in_page = (start_offset + dst_end) &
|
||||
((unsigned long)PAGE_CACHE_SIZE - 1);
|
||||
(PAGE_CACHE_SIZE - 1);
|
||||
src_off_in_page = (start_offset + src_end) &
|
||||
((unsigned long)PAGE_CACHE_SIZE - 1);
|
||||
(PAGE_CACHE_SIZE - 1);
|
||||
|
||||
cur = min_t(unsigned long, len, src_off_in_page + 1);
|
||||
cur = min(cur, dst_off_in_page + 1);
|
||||
|
Loading…
Reference in New Issue
Block a user