diff options
-rw-r--r-- | fs/btrfs/inode.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 32e778fb014e..46f54dfa2b0a 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -430,9 +430,10 @@ int btrfs_readpage_io_failed_hook(struct bio *failed_bio, | |||
430 | free_extent_map(em); | 430 | free_extent_map(em); |
431 | set_extent_bits(failure_tree, start, end, EXTENT_LOCKED | | 431 | set_extent_bits(failure_tree, start, end, EXTENT_LOCKED | |
432 | EXTENT_DIRTY, GFP_NOFS); | 432 | EXTENT_DIRTY, GFP_NOFS); |
433 | set_state_private(failure_tree, start, (u64)failrec); | 433 | set_state_private(failure_tree, start, |
434 | (u64)(unsigned long)failrec); | ||
434 | } else { | 435 | } else { |
435 | failrec = (struct io_failure_record *)private; | 436 | failrec = (struct io_failure_record *)(unsigned long)private; |
436 | } | 437 | } |
437 | num_copies = btrfs_num_copies( | 438 | num_copies = btrfs_num_copies( |
438 | &BTRFS_I(inode)->root->fs_info->mapping_tree, | 439 | &BTRFS_I(inode)->root->fs_info->mapping_tree, |
@@ -511,7 +512,8 @@ int btrfs_readpage_end_io_hook(struct page *page, u64 start, u64 end, | |||
511 | ret = get_state_private(&BTRFS_I(inode)->io_failure_tree, | 512 | ret = get_state_private(&BTRFS_I(inode)->io_failure_tree, |
512 | start, &private_failure); | 513 | start, &private_failure); |
513 | if (ret == 0) { | 514 | if (ret == 0) { |
514 | failure = (struct io_failure_record *)private_failure; | 515 | failure = (struct io_failure_record *)(unsigned long) |
516 | private_failure; | ||
515 | set_state_private(&BTRFS_I(inode)->io_failure_tree, | 517 | set_state_private(&BTRFS_I(inode)->io_failure_tree, |
516 | failure->start, 0); | 518 | failure->start, 0); |
517 | clear_extent_bits(&BTRFS_I(inode)->io_failure_tree, | 519 | clear_extent_bits(&BTRFS_I(inode)->io_failure_tree, |