struct btrfs_fs_info *fs_info = eb->fs_info;
struct btrfs_bio *bbio;
- if (test_bit(EXTENT_BUFFER_UPTODATE, &eb->bflags))
+ if (extent_buffer_uptodate(eb))
return 0;
/*
* started and finished reading the same eb. In this case, UPTODATE
* will now be set, and we shouldn't read it in again.
*/
- if (unlikely(test_bit(EXTENT_BUFFER_UPTODATE, &eb->bflags))) {
+ if (unlikely(extent_buffer_uptodate(eb))) {
clear_extent_buffer_reading(eb);
return 0;
}
return ret;
wait_on_bit_io(&eb->bflags, EXTENT_BUFFER_READING, TASK_UNINTERRUPTIBLE);
- if (unlikely(!test_bit(EXTENT_BUFFER_UPTODATE, &eb->bflags)))
+ if (unlikely(!extent_buffer_uptodate(eb)))
return -EIO;
return 0;
}
return num_extent_pages(eb);
}
-static inline int extent_buffer_uptodate(const struct extent_buffer *eb)
+static inline bool extent_buffer_uptodate(const struct extent_buffer *eb)
{
return test_bit(EXTENT_BUFFER_UPTODATE, &eb->bflags);
}